bpython

Enhanced Python interpreter with syntax highlighting and auto-completion.

brewmacoslinux
Try with needOr install directly
Source

About

Fancy interface to the Python interpreter

Commands

bpython

Examples

start interactive python shell with syntax highlighting$ bpython
run python script then drop into interactive shell$ bpython -i script.py
execute python code and display results with better formatting$ bpython -c "print('hello')"
get autocomplete suggestions while writing python code$ bpython
view command history in interactive python session$ bpython