Python 之tab键补全

2023-01-31 02:01:51 python tab 键补全
import sys
import readline
import rlcompleter
import atexit
import os
readline.parse_and_bind('tab: complete')
   
histfile = os.path.join(os.environ['HOME'], '.pythonhistory')
try:
    readline.read_history_file(histfile)
except ioError:
    pass
atexit.reGISter(readline.write_history_file, histfile)
del os, histfile, readline, rlcompleter


相关文章