def runcode(self, code):
     try:
         InterpreterKeyController.setEnabled_(True);
         exec code in self.locals
     except SystemExit:
         InterpreterKeyController.setEnabled_(False);
         raise
     except:
         InterpreterKeyController.setEnabled_(False);
         self.showtraceback()
     else:
         InterpreterKeyController.setEnabled_(False);
         if softspace(sys.stdout, 0):
             print
    def applicationDidFinishLaunching_(self, sender):
        if EmbeddedInterpreterPlugIn.alloc().init().plugInLoaded():
            from EmbeddedInterpreterPlugIn import InterpreterKeyController

            self.keyController = InterpreterKeyController.new().start()