Skip to content
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.

Pebaz/ptty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ptty

Project License

Python Terminal (Tiny)

A simple but powerful terminal for Python.

Hello World Output

Installation

$ pip install git+https://github.com/Pebaz/ptty

Usage

Meant to be imported and used inline similar to ipdb:

>>> def foo():
...     a = 3
...     import ptty; ptty()  # Launch Python REPL
...     print(a)

Can also be used from the command line like a normal Python REPL:

$ ptty

In situations where exceptions are used as a means of complex flow control (i.e. within a Pytest unit test invocation), being able to quickly import a funcional terminal is very convenient.

Dot Completion (Auto-Completion using . + <enter>)

To print out dot-completion information, type any valid name followed by a period character ('.') and hit . This will print out the member methods and fields for that object.

Dot Completion Output