Changeset 77 for trigger/PythonShell.py
- Timestamp:
- 06/30/09 11:09:39 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trigger/PythonShell.py
r52 r77 12 12 13 13 def run (self): 14 #outputShell= OutputShell()15 #OutputShell.start(outputShell)14 outputShell= OutputShell() 15 OutputShell.start(outputShell) 16 16 17 while(GlobalVariables.UserInput !="exit" and GlobalVariables.UserInput!= "EXIT"):17 while(GlobalVariables.UserInput[1:]!="exit" and GlobalVariables.UserInput[1:] != "EXIT"): 18 18 dummy=raw_input("SHELL>>> ") 19 if(GlobalVariables.UserInput!="exit" and GlobalVariables.UserInput != "EXIT"): 20 GlobalVariables.UserInput = dummy 19 if(GlobalVariables.UserInput[1:]!="exit" and GlobalVariables.UserInput[1:] != "EXIT"): 20 GlobalVariables.counter +=1 21 GlobalVariables.counter%=10 22 GlobalVariables.UserInput = str(GlobalVariables.counter)+dummy 23 21 24 else: 22 25 break … … 31 34 def run (self): 32 35 while(GlobalVariables.UserInput!="exit" and GlobalVariables.UserInput != "EXIT"): 33 if(GlobalVariables.UserInput!=self.lastvar): 34 print "\n(SHELL) You entered:",GlobalVariables.UserInput 36 time.sleep(0.001) 37 if(GlobalVariables.ServerMessage!=self.lastvar): 38 #print "\n(SHELL) You entered:",GlobalVariables.ServerMessage 35 39 #sys.stdout.write( "SHELL2 >>>") 36 self.lastvar=GlobalVariables.UserInput 40 print GlobalVariables.ServerMessage 41 self.lastvar=GlobalVariables.ServerMessage 42 37 43 print "EXITING OUTPUTSHELL...press <enter> to exit " 38 44 #sys.exit(0)
Note:
See TracChangeset
for help on using the changeset viewer.