I've been trying to build a function to interpret command-line inputs, then runs the appropriate function from within the script file with provided arguments. Included in this function is a escape command that closes the interaction layer. This escape command should only be activated if the user enters either 'exit' or 'end'. However, for some reason, it triggers no matter what is entered. I'm stumped. Do any of you have an idea?
verinfo ()
x = True
while x is True:
print ('Please seperate arguments with a comma.')
inputstring = input('->')
#format input string to a standard configuration
#expected is command,arg1,arg2,arg3,arg4,arg5
procstring = inputstring.split (',')
while len(procstring) < 6:
procstring.append('')
print (procstring)
#escape clause
print (procstring[0])
if procstring[0] is 'end' or 'exit':
print ('Closing')
x = False
break
elif procstring[0] is 'help' or 'Help':
Help ()
else:
print ('command invalid. List of commands can be accessed with "help"')