Skip to main content

vt102 implements a subset of the vt102 specification (the subset that should be most useful for use in software). Two classes: stream, which parses the command stream and dispatches events for commands, and screen which, when used with a stream maintains a buffer of strings representing the screen of a terminal.

Why would you ever want to use this?

  • Screen scraping.

  • Cheating at nethack (I swear to god I will ascend)

  • Chicks dig terminals, and err… VT?

Here’s a quick example:

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

Metadata

Release files for vt102 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vt102 0.2.1
File Size Uploaded Provenance Actions
vt102-0.2.1.tar.gz 10.7 kB Without provenance Details for vt102-0.2.1.tar.gz

Release files / vt102-0.2.1.tar.gz

Download URL vt102-0.2.1.tar.gz
Size 10.7 kB
Tags Source
SHA-256 checksum
How to use checksums
5ba9b5230cd438ebcfbc26411d5f6bd95c4c20b0269c5d836b5f816fd83768d0
BLAKE2b-256 checksum
How to use checksums
af29c09ab0294922601095e61f68a0979bda9d15a52a6d8970c0345680e881c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for vt102 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page