A unix/posix terminal manipulation library for python3


Keywords
color, input, posix, shell, terminal, tui, unix
License
GPL-3.0
Install
pip install reter==1.0.8

Documentation


Reter logo

Reter

Reter making simple things simple
Explore Docs! »

View Examples · Report Bug · Request Feature

Table of Contents
  1. About Reter
  2. Installation
  3. Projects Using Reter
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Thanks

Retry Terminal

Reter alternatively Terminal Retry is a pure-python, terminal manipulation library inspired by crossterm a terminal manipulation library for Rust. Reter makes it possible to write text-based interfaces (see features). It supports all UNIX terminals hopefully windows at some point (not all terminals are tested, see Tested Terminals for more info).

Features

  • Few dependencies
  • Full control over writing and flushing output buffer
  • Is tty
  • Cursor
    • Move the cursor N times (up, down, left, right)
    • Move to previous / next line
    • Move to column
    • Set/get the cursor position
    • Store the cursor position and restore to it later
    • Hide/show the cursor
    • Enable/disable cursor blinking (not all terminals support this feature)
  • Styled output
    • Foreground color (16 base colors)
    • Background color (16 base colors)
    • 256 (ANSI) color support
    • RGB/True color support
    • Text attributes like bold, italic, underscore, crossed, etc
  • Terminal
    • Clear (all lines, current line, from cursor down and up)
    • Set/get the terminal size
    • Exit current buffer
    • Alternate screen
    • Set terminal title
    • Enable/disable line wrapping
  • Event
    • Input Events
    • Terminal Resize Events
    • Advanced key events

Tested Terminals

  • Ubuntu Desktop Terminal
    • Ubuntu 17.10
    • Pop!_OS ( Ubuntu ) 20.04
  • (Arch, Manjaro) KDE Konsole
  • Linux Mint
  • Alacritty
  • Terminator
  • Gnome ( Ubuntu )
  • RXVT Color Terminal

This library supports all UNIX terminals and POSIX systems; however, not every terminal in the known universe have been tested. If you have used this library for a terminal other than the above list without issues (or with issues), then feel free to contact me (or create an issue) It would help drastically and I would really appreciate it!

Installation

Want to use Reter, first let me thank you for choosing Reter! Now without further ado lets get into it,

Pip

As of now pip is the only easy way to install Reter.

! LET IT BE KNOWN !

This is a very early (beta) version of reter, without docs or anything!

pip install reter

Modules using Reter

Nothing yet!

Thank you,

  • Zackery .R. Smith - Project owner & creator
  • Timon Post - Author of Crossterm

ANSI ESC Codes

Stackoverflow

stdin, stdout, and stderr

Lecture(s)