Autocompletion from command line.
Goal: Learn how to get autocompletion from command line in python.
In order to accomplish this, create a file containing the following lines:
import rlcompleterThen you simply need to set your environment variable PYTHONSTARTUP to point to this file.
import readline
readline.parse_and_bind("tab: complete")
After starting python, it will load this file (not if you tell it to run a script though) and you know have automatic completion.
Example:
python
import MV
MV.ar [tab][tab]
MV.arange MV.arcsin MV.arctan2
MV.around MV.arrayrangeMV.arccos
MV.arctan MV.argsort MV.array
Voila!