LPCBeremiz.py
changeset 449 9d5036e86c3d
parent 445 1b1dc8ad2498
child 472 80eb3bde98e3
equal deleted inserted replaced
448:8ef035de86de 449:9d5036e86c3d
   686     AddExceptHook(os.getcwd(),__version__)
   686     AddExceptHook(os.getcwd(),__version__)
   687 
   687 
   688     frame = LPCBeremiz(None, plugin_root=plugin_root, debug=False)
   688     frame = LPCBeremiz(None, plugin_root=plugin_root, debug=False)
   689     plugin_root.SetAppFrame(frame, frame.Log)
   689     plugin_root.SetAppFrame(frame, frame.Log)
   690     frame.Show()
   690     frame.Show()
       
   691     frame.Raise()
   691     
   692     
   692     app.MainLoop()
   693     app.MainLoop()
       
   694 
       
   695     frame = None
   693 
   696 
   694 class StdoutPseudoFile:
   697 class StdoutPseudoFile:
   695     """ Base class for file like objects to facilitate StdOut for the Shell."""
   698     """ Base class for file like objects to facilitate StdOut for the Shell."""
   696     def write(self, s, style = None):
   699     def write(self, s, style = None):
   697         if s != '':
   700         if s != '':
   742         
   745         
   743         def do_EOF(self, line):
   746         def do_EOF(self, line):
   744             return self.Exit()
   747             return self.Exit()
   745         
   748         
   746         def Show(self):
   749         def Show(self):
   747             beremiz_thread=Thread(target=BeremizStartProc, args=[self.PluginRoot])
   750             global frame
   748             beremiz_thread.start()
   751             if frame is None:
       
   752                 beremiz_thread=Thread(target=BeremizStartProc, args=[self.PluginRoot])
       
   753                 beremiz_thread.start()
   749         
   754         
   750         def Refresh(self):
   755         def Refresh(self):
   751             global frame
   756             global frame
   752             if frame is not None:
   757             if frame is not None:
   753                 wx.CallAfter(frame._Refresh, TITLE, INSTANCESTREE, FILEMENU, EDITMENU)
   758                 wx.CallAfter(frame._Refresh, TITLE, INSTANCESTREE, FILEMENU, EDITMENU)