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.
======
*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
Release history Release notifications | RSS feed
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 details)
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
ptterm-0.2-py3-none-any.whl
(33.4 kB
view details)
ptterm-0.2-py2-none-any.whl
(32.0 kB
view details)
File details
Details for the file ptterm-0.2.tar.gz.
File metadata
- Download URL: ptterm-0.2.tar.gz
- Upload date:
- Size: 27.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4f846fbf5d9f302a5442c8607d29b31beab08adb72ab34605085a7c55eb117a
|
|
| MD5 |
4fb863c2fb2a544089e2ae556a004a16
|
|
| BLAKE2b-256 |
3c23792677e3a8a68e86849ac116ceb9bcfa70f83681f491934f99d04f663968
|
File details
Details for the file ptterm-0.2-py3-none-any.whl.
File metadata
- Download URL: ptterm-0.2-py3-none-any.whl
- Upload date:
- Size: 33.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
848f397bf48bc0ac6bad8ed0400eb333d9f731eee6bba02415110231dd57970d
|
|
| MD5 |
a9759c3af5cf466056eb46ce9bdd0f5e
|
|
| BLAKE2b-256 |
057c6db53ec6947b26441a55a79726e42668e268685431078991a52d0fffce42
|
File details
Details for the file ptterm-0.2-py2-none-any.whl.
File metadata
- Download URL: ptterm-0.2-py2-none-any.whl
- Upload date:
- Size: 32.0 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa2e91f30b8aff9170238e300caf245f71b5ceea8a196716aa5cc906968750ec
|
|
| MD5 |
ac2c11c0e39b3c9ca31799b3e9066afb
|
|
| BLAKE2b-256 |
b83bb451c064fea66d1498824dc52451a67ecb2e1a9bc83752405da49fdee3dd
|