# `pwnlib.term` — Terminal handling

pwnlib.term.can_init()

  This function returns True iff stderr is a TTY and we are not inside a REPL. Iff this function returns True, a call to `init()` will let `pwnlib` manage the terminal.

pwnlib.term.init()

  Calling this function will take over the terminal (iff `can_init()` returns True) until the current python interpreter is closed.

  It is on our TODO, to create a function to “give back” the terminal without closing the interpreter.

pwnlib.term.term_mode = False

  This is True exactly when we have taken over the terminal using `init()`.

## Term Modules

- `pwnlib.term.readline` — Terminal nice readline
  - `eval_input()`
  - `raw_input()`
  - `str_input()`