Changeset 77 for trigger/PythonShell.py


Ignore:
Timestamp:
06/30/09 11:09:39 (15 years ago)
Author:
rissim
Message:
trigger: gui added, interface modified
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trigger/PythonShell.py

    r52 r77  
    1212
    1313    def run (self):
    14         #outputShell= OutputShell()
    15         #OutputShell.start(outputShell)
     14        outputShell= OutputShell()
     15        OutputShell.start(outputShell)
    1616       
    17         while(GlobalVariables.UserInput!="exit" and GlobalVariables.UserInput != "EXIT"):
     17        while(GlobalVariables.UserInput[1:]!="exit" and GlobalVariables.UserInput[1:] != "EXIT"):
    1818            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
    2124            else:
    2225                break
     
    3134    def run (self):
    3235        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
    3539                #sys.stdout.write( "SHELL2 >>>")
    36                 self.lastvar=GlobalVariables.UserInput
     40                print GlobalVariables.ServerMessage
     41                self.lastvar=GlobalVariables.ServerMessage
     42             
    3743        print "EXITING OUTPUTSHELL...press <enter> to exit "
    3844        #sys.exit(0)
Note: See TracChangeset for help on using the changeset viewer.