Skip to main content

Simple VTXXX-compatible terminal emulator.

Project description

               _
              | |
 _ __   _   _ | |_  ___
| '_ \ | | | || __|/ _ \
| |_) || |_| || |_|  __/
| .__/  \__, | \__|\___|
| |      __/ |
|_|     |___/      0.4.1

-- chicks dig dudes with terminals (c) @samfoo

About

What is pyte? It’s an in memory VTXXX-compatible terminal emulator. XXX stands for a series 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 htop or aptitude.

  • 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 setuptools you can use easy_install -U pyte. Otherwise, you can download the source from GitHub and run python setup.py install.

Example

>>> import pyte
>>> screen = pyte.Screen(80, 24)
>>> stream = pyte.Stream()
>>> stream.attach(screen)
>>> stream.feed("Hello World!")
>>> screen.display
    ['Hello World!                                                                    ',
     '                                                                                ',
     '                                                                                ',
     '                                                                                ',
     '                                                                                ',
     '                                                                                ',
     '                                                                                ',
     '                                                                                ',
     '                                                                                ',
     '                                                                                ',
     '                                                                                ',
     '                                                                                ',
     '                                                                                ',
     '                                                                                ',
     '                                                                                ',
     '                                                                                ',
     '                                                                                ',
     '                                                                                ',
     '                                                                                ',
     '                                                                                ',
     '                                                                                ',
     '                                                                                ',
     '                                                                                ',
     '                                                                                ']

Alternatives

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyte-0.4.1.tar.gz (21.0 kB view details)

Uploaded Source

File details

Details for the file pyte-0.4.1.tar.gz.

File metadata

  • Download URL: pyte-0.4.1.tar.gz
  • Upload date:
  • Size: 21.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyte-0.4.1.tar.gz
Algorithm Hash digest
SHA256 ada807d5371d595184e8322315a963053d9b8e326f587d8ee7a9b9ff54e2c558
MD5 18e3e2560409b83188b5d4e35c0a77f7
BLAKE2b-256 e3059692bd03b2daf20ece1ad934c6aed9ec7e191bcbbabbc68054eb41de0cfa

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page