Miscellaneous Python notes: enabling tab-completion in the interactive shell, and a tip that .whl files are just zip archives.
- Making the plain
pythonREPL usable (tab completion). - Understanding that you can inspect/unpack a
.whllike any zip.
For tab completion, install the readline helpers:
sudo pip install readline rlcompleter3Create ~/.pythonrc:
# ~/.pythonrc — enable tab completion
try:
import readline
except ImportError:
print("Module readline not available.")
else:
import rlcompleter
readline.parse_and_bind("tab: complete")Then in ~/.bashrc:
export PYTHONSTARTUP=~/.pythonrcStart python and press Tab to complete names. For Windows prebuilt wheels, see https://www.lfd.uci.edu/~gohlke/pythonlibs/ . The .whl format is a zip — unzip package.whl works.