Pour activer l'autocomplétion dans un shell python

  1. on créée un ~/.pythonrc
  2. on appelle le pythonrc dans le ~/.bashrc

/home/user/.pythonrc

try:
import readline
except ImportError:
    print "Module readline not available."
else:
    import rlcompleter
    readline.parse_and_bind("tab: complete")

/home/user/.bashrc

ajouter

export PYTHONSTARTUP=~/.pythonrc

That's all folks …