Coder Social home page Coder Social logo

amarao / vt102 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from samfoo/vt102

2.0 3.0 0.0 561 KB

Python based terminal emulation library with linux console_codes support (still named 'vt102', though)

Home Page: http://ifdown.net

License: GNU Lesser General Public License v3.0

Python 100.00%

vt102's Introduction

vt102

«Chicks dig dudes with terminals» © @samfoo

About

What is vt102? 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. vt102 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.

Installation

If you have setuptools you can use easy_install -U vt102. Otherwise, you can download the source from GitHub and run python setup.py install.

Example

>>> import vt102 >>> screen = vt102.Screen(80, 24) >>> stream = vt102.Stream() >>> stream.attach(screen) >>> stream.feed(u"u001b7u001b[?47hu001b)0u001b[Hu001b[2Ju001b[H" u"u001b[2;1HNetHack, Copyright 1985-2003ru001b[3;1" u"H By Stichting Mathematisch Centrum and M. " u"Stephenson.ru001b[4;1H See license for de" u"tails.ru001b[5;1Hu001b[6;1Hu001b[7;1HShall I pi" u"ck a character's race, role, gender and alignment f" u"or you? [ynq] ") >>> screen.display [' ', 'NetHack, Copyright 1985-2003 ', ' By Stichting Mathematisch Centrum and M. Stephenson. ', ' See license for details. ', ' ', ' ', "Shall I pick a character's race, role, gender and alignment for you? [ynq] ", ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '] >>>

Options?

vt102 is not alone in the weird world of terminal emulator libraries, here's a few other options worth checking out: Termemulator, pyqonsole, webtty AjaxTerm

vt102's People

Contributors

superbobry avatar samfoo avatar knsd avatar amarao avatar

Stargazers

 avatar  avatar

Watchers

Dan Groshev avatar  avatar James Cloos avatar

vt102's Issues

Control characters inside ESC sequences

According to linux/drivers/tty/vt.c: «Control characters can be used in the _middle_of an escape sequence.» -- since we claim to support TERM=linux we should allow that as well.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.