Python tab键自动补全

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

#!/usr/bin/env python
# python startup file
import sys
import readline
import rlcompleter
import atexit
import os
# tab completion
readline.parse_and_bind('tab: complete')
# history file
histfile = os.path.join(os.environ['HOME'],'.pythonhistory')
try:
	readline.read_history_file(histfile)
except IOError:
	pass
atexit.register(readline.write_history_file, histfile)


转载于:https://my.oschina.net/u/2428313/blog/486765

你可能感兴趣的:(Python tab键自动补全)