To install the augmented Python REPL experience with bpython, you need to install it in your environment. To do so, make sure your virtual environment is activated, then use your package manager to install:
$ pip install bpython
What Does bpython Do?
Following that, your Python and Django shells should now be adorned with a couple of helpful enhancements, such as:
- In-line syntax highlighting
- Readline-like autocomplete with suggestions displayed as you type.
- Expected parameter list for any Python function.
- Save the code you've entered to a file.
- Auto-indentation.
... and more. Check out their official website to learn more.
Info: Installing bpython is completely optional and not part of the Django polls tutorial. It's just a convenient tool that makes interacting with your Django shell easier and more colorful :)
Summary: Install bpython
- Install
bpythonin your virtual environment with the following command:pip install bpython - bpython augments your shells with syntax highlighting, autocomplete, parameter list, saving code, and auto-indentation