import os import sys import atexit import readline import rlcompleter try: import readline readline_disponible = True except ImportError: readline_disponible = False if not readline_disponible: sys.exit(0) print "chargement des options" # tabulation readline.parse_and_bind('tab: complete') # historique home = os.getenv('HOME') historique = os.path.join(home, '.pythonhistorique') try: readline.read_history_file(historique) except IOError: pass atexit.register(readline.write_history_file, historique) # Si vous voulez ajouter un repertoire toto dans la recherche des modules... # sys.path=sys.path+['', toto] # nettoyage de sys.modules del (os,sys,historique,atexit, readline, rlcompleter,readline_disponible,home)