[Python Tips] A better interactive shell

If you frequently use python interactively by typing in python or python3 then you will really love this next tip.

There is a better interactive python shell that has in-line syntax highlighting and code insight (aka autocomplete). The code insight isn't perfect and doesn't work 100% of the time but it does work most of the time. The syntax highlighting is really nice as well.

Do these features look good?

  • In-line syntax highlighting
  • Readline-like autocomplete with suggestions displayed as you type.
  • Expected parameter list for any Python function.
  • "Rewind" function to pop the last line of code from memory and re-evaluate.
  • Send the code you've entered off to a pastebin.
  • Save the code you've entered to a file.
  • Auto-indentation.
  • Python 3 support.

Introducing bpython!

Bpython is an interactive shell for python that has powerful features that mimic a quality IDE. In the end it is still a low level interpreted shell, but it can drastically improve your quality of life if you frequently use the interactive shell.

Starting bpython

Code completion

Code Insight

Docstring support

Syntax Highlighting

image.png

Send session to external editor (F7)

Send session to pastebin (F8)

There is a short five-minute video the developers made that show off the features that is worth checking out if you want to see it in action.

Python Tips Series

X48EJ

Why you should vote me as witness

Witness & Administrator of four full nodes

themarkymark.png

My recent popular posts

STEEM, STEEM Power, Vests, and Steem Dollars. wtf is this shit?
The truth and lies about 25% curation, why what you know is FAKE NEWS
WTF is a hardware wallet, and why should you have one?
GINABOT - The Secret to your Sanity on Steemit
How to calculate post rewards
Use SSH all the time? Time for a big boy SSH Client
How to change your recovery account
How curation rewards work and how to be a kick ass curator
Markdown 101 - How to make kick ass posts on Steemit
Work ON your business, not in your business! - How to succeed as a small business
You are not entitled to an audience, you need to earn it!
How to properly setup SSH Key Authentication - If you are logging into your server with root, you are doing it wrong!
Building a Portable Game Console

H2
H3
H4
3 columns
2 columns
1 column
14 Comments
Ecency