def main(args=sys.argv): logging.basicConfig(level=logging.DEBUG, format="%(asctime)19.19s %(levelname)4.4s %(message)s") module_log = logging.getLogger("eve_mlp") module_log.setLevel(logging.DEBUG) app = InspectableApp(False) frame = MainFrame(None) #import wx.lib.inspection #wx.lib.inspection.InspectionTool().Show() app.MainLoop()
def bootstrap_frame(frametype, *args, **kwargs): from wx.lib.mixins.inspection import InspectableApp import util.i18n app = InspectableApp(0) guiconfig.load_icons() util.i18n.install_dummy_translator() frame = frametype(*args, **kwargs) frame.Show() app.ShowInspectionTool() app.MainLoop()
setattr(dlg, self.name, value) return True def TransferToWindow(self): dlg = self.Window.Parent value = getattr(dlg, self.name) dlg._fields[self.name][1].SetValue(value) return True if __name__ == '__main__': from wx.lib.mixins.inspection import InspectableApp app = InspectableApp(redirect=False) #app = wx.App(redirect=False) fields = [ ('username', 'Login ID:', None), ('passwd', 'Password:'******'rdunn'), captionTitle="Login", captionDescr="Enter your testing credentials") if dlg.ShowModal() == wx.ID_OK: print(dlg.username, dlg.passwd) dlg.Destroy() app.MainLoop()
SocketLabel=info.ControlFrameOutSocketLabel + info.LocalSuffix, BelongsToDatacore=True) # vizop's primary display shows either a welcome frame or a control frame, depending on whether any project is open RequestedToQuit = False # whether user has requested to terminate vizop while not RequestedToQuit: if OpenProjects: # any projects open? if so, display CurrentProject's control frame # TODO need to assign unique ID to controlframe. Maybe from its socket number? ControlFrame = controlframe.ControlFrame( Projects=OpenProjects, ID="1", FirstProject=CurrentProject, ColScheme=ColourScheme, zmqContext=vizop_misc.zmqContext, DatacoreIsLocal=True) app.MainLoop( ) # allow ControlFrame's event handlers to control program flow until ControlFrame is destroyed # we assume that ControlFrame will close all projects by itself # get ControlFrame's exit data RequestedToQuit = controlframe.ControlFrameData.Data.get( 'RequestToQuit', False) else: # no projects open: launch welcome screen WelcomeFrame = startup_vizop.NoProjectOpenFrame( parent=None, ID=-1, title=_("Vizop: Let's get started"), ColourScheme=ColourScheme) app.MainLoop( ) # allow WelcomeFrame's event handlers to control program flow until WelcomeFrame is destroyed # get WelcomeFrame's exit data ProjectFilesToOpen = startup_vizop.NoProjectOpenFrameData.Data.get( 'ProjectFilesToOpen', [])
def OnSaveAs(self, evt): self.grid.save(True) def OnUndo(self, evt): self.grid.histories.undo() def OnCut(self, evt): self.grid.Cut() def OnCopy(self, evt): self.grid.Copy() def OnPaste(self, evt): self.grid.Paste() if __name__ == "__main__": import sys from wx.lib.mixins.inspection import InspectableApp application = InspectableApp(False) frame = AppFrame(None, sys.stdout) frame.Show() if len(sys.argv) > 1: # 起動引数があればファイルを開く frame.grid.openFile(sys.argv[1]) # テスト用コード # frame.grid.openFile("test.csv") application.MainLoop()