#!/usr/bin/envpython#pythonstartupfileimportsysimportreadlineimportrlcompleterimportatexitimportos#tabcompletionreadline.parse_and_bind('tab:complete')#historyfilehistfile=os.path.join(os.environ['HOME'],'.pythonhistory')try:readline.read_history_file(histfile)exceptIOError:passatexit.register(readline.write_history_file,histfile)delos,histfile,readline,rlcompleter#forLinux