_
| |
_ __ _ _ | |_ ___
| '_ \ | | | || __|/ _ \
| |_) || |_| || |_| __/
| .__/ \__, | \__|\___|
| | __/ |
|_| |___/ 0.8.2
What is pyte?¶
It’s an in memory VTXXX-compatible terminal emulator.
XXX stands for a series of video terminals, developed by
DEC between
1970 and 1995. The first, and probably the most famous one, was VT100
terminal, which is now a de-facto standard for all virtual terminal
emulators. pyte follows the suit.
So, why would one need a terminal emulator library?
To screen scrape terminal apps, for example
htoporaptitude.To write cross platform terminal emulators; either with a graphical (xterm, rxvt) or a web interface, like AjaxTerm.
To have fun, hacking on the ancient, poorly documented technologies.
Note: pyte started as a fork of vt102,
which is an incomplete pure Python implementation of VT100 terminal.
Installation¶
If you have pip you can do the usual:
pip install pyte
Otherwise, download the source from GitHub and run:
python setup.py install
Similar projects¶
pyte is not alone in the weird world of terminal emulator libraries,
here’s a few other options worth checking out:
Termemulator,
pyqonsole,
webtty,
AjaxTerm and of course
vt102.
pyte users¶
Believe it or not, there’re projects which actually need a terminal emulator
library. Not many of them use pyte, though. Here’s a shortlist the ones
that do:
Ajenti – a webadmin panel for Linux and BSD, which uses
pytefor its terminal plugin.Pymux – a terminal multiplexor.
BastionSSH – a tool for protecting, monitoring and accessing multiple SSH resources.
Jumpserver – an open source springboard machine(fortress machine): authentication, authorization, audit, automated operation and maintenance.
Byexample – a literate programming engine where you mix ordinary text and snippets of code in the same file and then you execute them as regression test similar to doctest.
Note
Using pyte? Add yourself to this list and submit a pull request.
Show me the code!¶
Head over to our brief Tutorial or, if you’re feeling brave, dive right
into the API reference; pyte also has a couple of examples in the
examples directory.
- Tutorial
- API reference
- pyte.streams
- pyte.Stream
- pyte.ByteStream
- pyte.screens
- pyte.screens.Screen
CursorCharScreenScreen.bufferScreen.dirtyScreen.cursorScreen.marginsScreen.charsetScreen.default_charScreen.displayScreen.reset()Screen.resize()Screen.set_margins()Screen.set_mode()Screen.reset_mode()Screen.define_charset()Screen.shift_in()Screen.shift_out()Screen.draw()Screen.set_title()Screen.set_icon_name()Screen.carriage_return()Screen.index()Screen.reverse_index()Screen.linefeed()Screen.tab()Screen.backspace()Screen.save_cursor()Screen.restore_cursor()Screen.insert_lines()Screen.delete_lines()Screen.insert_characters()Screen.delete_characters()Screen.erase_characters()Screen.erase_in_line()Screen.erase_in_display()Screen.set_tab_stop()Screen.clear_tab_stop()Screen.ensure_hbounds()Screen.ensure_vbounds()Screen.cursor_up()Screen.cursor_up1()Screen.cursor_down()Screen.cursor_down1()Screen.cursor_back()Screen.cursor_forward()Screen.cursor_position()Screen.cursor_to_column()Screen.cursor_to_line()Screen.bell()Screen.alignment_display()Screen.select_graphic_rendition()Screen.report_device_attributes()Screen.report_device_status()Screen.write_process_input()Screen.debug()
- pyte.screens.DiffScreen
- pyte.screens.HistoryScreen
- pyte.screens.DebugScreen
- pyte.modes
LNMIRMDECTCEMDECSCNMDECOMDECAWMDECCOLM- pyte.control
SPNULBELBSHTLFVTFFCRSOSICANSUBESCDELCSI_C0ST_C0OSC_C0- pyte.escape
RISINDNELHTSRIDECSCDECRCDECALNICHCUUCUDCUFCUBCNLCPLCHACUPEDELILDLDCHECHHPRDAVPAVPRHVPTBCSMRMSGRDSRDECSTBMHPA- pyte.graphics
TEXTFG_ANSIFGFG_AIXTERMBG_ANSIBGBG_AIXTERMFG_256BG_256- pyte.charsets
LAT1_MAPVT100_MAPIBMPC_MAPVAX42_MAP
- pyte Changelog
- Version 0.8.2
- Version 0.8.1
- Version 0.8.0
- Version 0.7.0
- Version 0.6.0
- Version 0.5.2
- Version 0.5.1
- Version 0.5.0
- Version 0.4.10
- Version 0.4.9
- Version 0.4.8
- Version 0.4.7
- Version 0.4.6
- Version 0.4.5
- Version 0.4.4
- Version 0.4.3
- Version 0.4.2
- Version 0.4.1
- Version 0.4.0
- Version 0.3.9
- Version 0.3.8
- Version 0.3.7