修改环境变量.bashrc或.zshrc:
PYTHONSTARTUP=‘/home/users/xx/.pythonstartup‘
export PYTHONSTARTUP
写入.pythonstartup文件
try:
import readline
except ImportError:
print " readline not available"
else:
import rlcompleter
readline.parse_and_bind("tab: complete")
时间: 2024-10-07 12:20:17