一.交互模式 #python Python 2.6.6 (r266:84292, Jan 22 2014, 09:42:36) [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> 如上所示: 其中”>>&
这个功能是以lib的形式提供的,配置写到home下的.pythonrc文件中, 并设置好环境变量让python启动时执行初始化: # ~/.pythonrc # enable syntax completion # add the next line to your ~/.bashrc # export PYTHONSTARTUP=~/.pythonrc try: import readline except ImportError: print("Module readline not ava