1 #!/usr/bin/env python
 2 # python startup 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 del os, histfile, readline, rlcompleter
18 
19 #for Linux

 

相关文章:

  • 2021-11-18
  • 2021-11-05
  • 2022-12-23
  • 2021-08-13
  • 2022-12-23
  • 2021-07-23
  • 2021-08-19
  • 2021-09-19
猜你喜欢
  • 2021-07-23
  • 2021-12-03
  • 2021-10-15
  • 2021-07-18
相关资源
相似解决方案