-
9 年前
python 脚本交互输入系统命令时实现Tab补全
Shell/Python raw_input tab 补全
command_tab.py #/usr/bin/python #coding:utf8 import readline,os,commands,sys readline.set_completer_delims(' \t\n`~!@#$%^&*()=+[{]}\\|;:\'",<>/?') def allcommands(): a=commands.get…
command_tab.py #/usr/bin/python #coding:utf8 import readline,os,commands,sys readline.set_completer_delims(' \t\n`~!@#$%^&*()=+[{]}\\|;:\'",<>/?') def allcommands(): a=commands.get…