def choice():
global name
global module
try:
if module == "":
readline.set_completer(completer)
readline.set_completer_delims('')
if 'libedit' in readline.__doc__:
readline.parse_and_bind("bind ^I rl_complete")
else:
readline.parse_and_bind("tab: complete")
raw_choice = raw_input(" >> [" + name + "]# ")
choice = raw_choice
exec_menu(choice)
else:
readline.set_completer(completer)
readline.set_completer_delims('')
if 'libedit' in readline.__doc__:
readline.parse_and_bind("bind ^I rl_complete")
else:
readline.parse_and_bind("tab: complete")
raw_choice = raw_input(" >> [" + name + "][" + module + "]# ")
choice = raw_choice
exec_menu(choice)
except EOFError:
pass
except KeyboardInterrupt:
exec_menu('exit')
评论列表
文章目录