LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

ptpython

Enhanced interactive Python REPL

TLDR

Start Python REPL
$ ptpython
copy
Start with vi mode
$ ptpython --vi
copy
Execute file then REPL
$ ptpython -i [script.py]
copy
Start IPython mode
$ ptipython
copy

SYNOPSIS

ptpython [options] [file]

DESCRIPTION

ptpython is an enhanced Python REPL built on the prompt_toolkit library. It provides syntax highlighting, multi-line editing, autocompletion, mouse support, and vi/emacs key bindings, offering a significantly improved interactive experience over the default Python shell.Features include function signature display, input validation, clipboard support, and the ability to embed ptpython in existing applications. The ptipython variant combines ptpython's UI with IPython's magic commands and features.

PARAMETERS

FILE

Python file to execute.
--vi
Use Vi-style key bindings instead of Emacs (default).
-i, --interactive
Drop into the REPL after running the given script.
--light-bg
Optimize colors for terminals with a light background.
--dark-bg
Optimize colors for terminals with a dark background.
--config-file FILE
Use the specified Python configuration file instead of the default.
--history-file FILE
Use a custom history file location.
-V, --version
Display version information.

CONFIGURATION

~/.config/ptpython/config.py

Python configuration file for customizing key bindings, color scheme, completion behavior, and other REPL settings.

INSTALL

brew install ptpython
copy

CAVEATS

Requires installation. Uses prompt_toolkit.

HISTORY

ptpython was created as an enhanced Python REPL with modern features.

SEE ALSO

python(1), ipython(1), bpython(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid