tempFrameEventBus = OpenFrameEventBus.OpenFrameEventBus( thisFrame, self.app.eventBusMonitor, row=1) tempFrameEventBus.show() # add to menu self.window.addMenuItem( name=self.MENUENTRY_EVENTBUS, frame=thisFrame, ) #======================== public ========================================== def start(self): self.window.startGui() def close(self): self.app.close() #======================== private ========================================= def _updateMenuFrameNames(self): for i in range(len(self.menuFrames)): self.menuFrames[i].updateMenuLabel(i) #============================ main ============================================ if __name__ == "__main__": app = openVisualizerApp.main() gui = OpenVisualizerGui(app) gui.start()
argspace = parser.parse_known_args()[0] # log log.info( 'Initializing OpenVisualizerWeb with options: \n\t{0}'.format( '\n '.join( [ 'host = {0}'.format(argspace.host), 'port = {0}'.format(argspace.port) ] ) ) ) #===== start the app app = openVisualizerApp.main(parser) #===== add a web interface websrv = bottle.Bottle() webapp = OpenVisualizerWeb(app, websrv) # start web interface in a separate thread webthread = threading.Thread( target = websrv.run, kwargs = { 'host' : argspace.host, 'port' : argspace.port, 'quiet' : not app.debug, 'debug' : app.debug, } )
self.stdout.write( 'type "help <topic>" for topic details\n'.format(80-maxlen-3)) for name in names: if name[:3] == 'do_': try: doc = getattr(self, name).__doc__ if doc: # Handle multi-line doc comments and format for length. doclines = doc.splitlines() doc = doclines[0] if len(doc) == 0 and len(doclines) > 0: doc = doclines[1].strip() if len(doc) > maxlen: doc = doc[:maxlen] + '...' self.stdout.write('{0} - {1}\n'.format( name[3:80-maxlen], doc)) except AttributeError: pass def do_quit(self, arg): self.app.close() return True #============================ main ============================================ if __name__=="__main__": app = openVisualizerApp.main() cli = OpenVisualizerCli(app) cli.cmdloop()
webapp = None if __name__ == "__main__": parser = ArgumentParser() _addParserArgs(parser) argspace = parser.parse_known_args()[0] # log log.info('Initializing OpenVisualizerWeb with options: \n\t{0}'.format( '\n '.join([ 'host = {0}'.format(argspace.host), 'port = {0}'.format(argspace.port) ]))) #===== start the app app = openVisualizerApp.main(parser) #===== add a web interface websrv = bottle.Bottle() webapp = OpenVisualizerWeb(app, websrv) # start web interface in a separate thread webthread = threading.Thread(target=websrv.run, kwargs={ 'host': argspace.host, 'port': argspace.port, 'quiet': not app.debug, 'debug': app.debug, }) webthread.start()
webapp = None if __name__ == "__main__": parser = ArgumentParser() _addParserArgs(parser) argspace = parser.parse_known_args()[0] # log log.info('Initializing OpenVisualizerWeb with options: \n\t{0}'.format( '\n '.join([ 'host = {0}'.format(argspace.host), 'port = {0}'.format(argspace.port) ]))) #===== start the app app = openVisualizerApp.main(parser, argspace.roverMode) #===== add a web interface websrv = bottle.Bottle() webapp = OpenVisualizerWeb(app, websrv, argspace.roverMode) # start web interface in a separate thread webthread = threading.Thread(target=websrv.run, kwargs={ 'host': argspace.host, 'port': argspace.port, 'quiet': not app.debug, 'debug': app.debug, }) webthread.start()