Skip to main content

Terminal emulator for prompt_toolkit.

Project description

ptterm
======

*A terminal emulator widget for prompt_toolkit applications*

Features
--------

- Cross platform: Windows + Linux support.


Applications using ptterm
-------------------------

- `pymux <https://github.com/jonathanslenders/pymux>`_: A terminal multiplexer,
written in Python.


Example
-------

Inserting the terminal into a prompt_toolkit application is as easy as
importing a `Terminal` and inserting it into the layout. You can pass a
`done_callback` to get notified when the terminal process is done.


.. code:: python

#!/usr/bin/env python
from prompt_toolkit.application import Application
from prompt_toolkit.layout import Layout
from ptterm import Terminal


def main():
def done():
application.exit()

application = Application(
layout=Layout(
container=Terminal(done_callback=done)
),
full_screen=True,
)
application.run()


if __name__ == '__main__':
main()


Thanks
------

- Thanks to `pyte <https://github.com/selectel/pyte>`_: for implementing a
vt100 emulator.
- Thanks to `winpty <https://github.com/rprichard/winpty`_: for providing a PTY
like interface for the Windows console.
- Thank to `yawinpty` for creating a Winpty wrapper.

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

ptterm-0.2.tar.gz (27.5 kB view hashes)

Uploaded Source

Built Distributions

ptterm-0.2-py3-none-any.whl (33.4 kB view hashes)

Uploaded Python 3

ptterm-0.2-py2-none-any.whl (32.0 kB view hashes)

Uploaded Python 2

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