Skip to main content

Simple vt102 emulator, useful for screen scraping.

Project description

[vt102](http://github.com/samfoo/vt102) is an in memory vt1xx terminal emulator. It supports all the most common terminal escape sequences, including text attributes and color.

It’s an in memory vt1XX-compatible terminal emulator. The XX stands for a series video terminals, developed by [DEC](http://en.wikipedia.org/wiki/Digital_Equipment_Corporation) between 1970 and 1995. The first, and most famous one, was VT100 terminal, which is now a de-facto standard for all virtual terminal emulators. [vt102](http://github.com/samfoo/vt102) is one such emulator.

Why would you want to use a terminal emulator?

  • Screen scraping some terminal or curses app.

  • Writing your own graphical terminal emulator.

  • … seriously, that’s about it.

Here’s a quick example:

>>> from vt102 import screen, stream
>>> st = stream()
>>> sc = screen((10, 10))
>>> print(sc)
["          ",
 "          ",
 "          ",
 "          ",
 "          ",
 "          ",
 "          ",
 "          ",
 "          ",
 "          "]
>>> sc.attach(st)
>>> st.process("Text goes here")
>>> print(sc)
["Text goes ",
 "here      ",
 "          ",
 "          ",
 "          ",
 "          ",
 "          ",
 "          ",
 "          ",
 "          "]
>>> st.process("\x1b[H\x1b[K")
>>> print(sc)
["          ",
 "here      ",
 "          ",
 "          ",
 "          ",
 "          ",
 "          ",
 "          ",
 "          ",
 "          "]

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

vt102-0.5.tar.gz (12.1 kB view details)

Uploaded Source

File details

Details for the file vt102-0.5.tar.gz.

File metadata

  • Download URL: vt102-0.5.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for vt102-0.5.tar.gz
Algorithm Hash digest
SHA256 21d7a1249acd6d8ab7218a0450724e556babc589cf5f3455b8327d6370e2f877
MD5 a33a1e0a1b5981714d5ce43b44c2eda3
BLAKE2b-256 36eb88d10ed78be94a9c1efbdc021bc4e5cf2f65f1981e6e4523ab6b3363f9f3

See more details on using hashes here.

Supported by

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