当我使用命令终止程序时,它不会终止,而是假设我说“不”时要打开另一个程序这是我的代码:
import getpass
print 'Hello', getpass.getuser(), ', welcome!'
do = raw_input ('What program would you like to open? ')
if do.lower() == 'browser' or 'internet' or 'Chrome' or 'Google chrome':
import webbrowser
webbrowser.open ('www.google.com')
oth = raw_input ('Are there any others? ')
if oth.lower() == 'yes' or 'ye' or 'yeah':
oth2 = raw_input ('Please name the program you would like to open! ')
else:
import sys
sys.exit()