您的位置:首页 > 其它

统计不连续卡号问题

2011-09-17 10:08 190 查看
1, TAB补全代码
#!/usr/bin/python
#pyton 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)

del os, histfile, readline, rlcompleter
#end
2, 测试TAB代码
>>> import tab
>>> import hello
hello,world
>>> hello
hello
>>> hello.          -------这里敲TAB键补全
hello.__class__(         hello.__hash__(          hello.__repr__(
hello.__delattr__(       hello.__init__(          hello.__setattr__(
hello.__dict__           hello.__name__           hello.__sizeof__(
hello.__doc__            hello.__new__(           hello.__str__(
hello.__file__           hello.__package__        hello.__subclasshook__(
hello.__format__(        hello.__reduce__(        hello.a
hello.__getattribute__(  hello.__reduce_ex__(
>>> hello.


本文出自 “丁同学1990” 博客,请务必保留此出处http://dingtongxue1990.blog.51cto.com/4959501/1674271
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: