#!/usr/bin/env python
#_*_coding:utf-8 _*_
import sys
import os
import readline
import rlcompleter
import atexit
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
本文出自 “执念” 博客,请务必保留此出处http://zcl1101017794.blog.51cto.com/7962179/1603576
原文地址:http://zcl1101017794.blog.51cto.com/7962179/1603576