Skip to content

prompt-toolkit/ptterm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ptterm

A terminal emulator widget for prompt_toolkit applications

Features

  • Cross platform: Windows + Linux support.

Applications using ptterm

  • 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.

#!/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

About

Terminal emulator widget for prompt_toolkit applications.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages