1 #!/usr/bin/python 2 #python steup file 3 import sys 4 import readline 5 import rlcompleter 6 import atexit 7 import os 8 # tab completion 9 readline.parse_and_bind(‘tab: complete‘) 10 #history file 11 histfile = os.path.join(os.environ[‘HOME‘], ‘.pythonhistory‘) 12 try: 13 readline.read_history_file(histfile) 14 except IOError: 15 pass 16 atexit.register(readline.write_history_file, histfile) 17 18 del os, histfile, readline, rlcompleter
时间: 2024-10-22 14:57:59