Exemple #1
0
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()
Exemple #2
0
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()
Exemple #3
0
    def TransferFromWindow(self):
        dlg = self.Window.Parent
        value = dlg._fields[self.name][1].GetValue()
        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)
Exemple #4
0
class TestFrame(wx.Frame):
    def __init__(self, parent, log):
        wx.Frame.__init__(self,
                          parent,
                          -1,
                          "Simple Grid Demo",
                          size=(640, 640))
        self.grid = SimpleGrid(self, log)


#---------------------------------------------------------------------------

if __name__ == '__main__':
    import sys
    print("hhh!!!")
    sys.stdout.write("hll" + "\n")
    if (0):  #this section is modified by tony
        from wx.lib.mixins.inspection import InspectableApp
        app = InspectableApp(False)
    else:
        app = wx.App(False)
    frame = TestFrame(None, sys.stdout)
    if (0):  #this section is modified by tony
        print(sys.stdout)
        print(type(sys.stdout))
    frame.Show(True)
    #import wx.lib.inspection
    #wx.lib.inspection.InspectionTool().Show()
    app.MainLoop()
Exemple #5
0
def LaunchCommsThread():  # redundant
    # set up communications sockets for communications with Viewports.
    # launch a thread for handling requests received.
    # launch thread for handling requests
    CommsThread = threading.Thread(target=RunCommsThread)
    CommsThread.setDaemon(
        daemonic=True
    )  # to prevent comms thread from blocking Vizop termination
    CommsThread.start()


# main program
CheckRuntimeEnvironment()
app = InspectableApp(
    0
)  # make the wx app. Use Ctrl + Alt + I to inspect things. Need this before InitializeVizop()
StartupProblems = startup_vizop.InitializeVizop(
)  # do some setting up and find any fatal environment problems
if StartupProblems:
    print("Unable to run ",
          info.PROG_SHORT_NAME,
          ". The following problems were reported:\n",
          StartupProblems,
          sep='')
    exit()
#setup gettext for translating messages
# first, find the path in which vizop is running
# set up the translator. _('foo') means 'get the translation of foo into the language defined in locale'
# We don't need this here because gettext is set up in module startup_vizop
# setup_script_path = os.path.dirname(os.path.abspath(sys.argv[0]))
Exemple #6
0
        self.containingpanel.SetSizer(self.cpsizer)

        mainsizer = wx.BoxSizer(wx.VERTICAL)
        mainsizer.Add(self.toppanel, 0, wx.EXPAND)
        mainsizer.Add(self.containingpanel, 1, wx.EXPAND)
        self.SetSizer(mainsizer)

        self.panel.SetupScrolling()
        self.gridpanel.SetupScrolling()
        self.draw_plot()

    def draw_plot(self):
        for i in range(10):  
            if i in self.selection:
                self.grid.ShowRow(i)
            else:
                self.grid.HideRow(i)

        s = self.grid.GetBestSize()
        print(s)
        self.splittedwin.SetSashPosition(s[1])


if __name__ == "__main__":

    from wx.lib.mixins.inspection import InspectableApp
    app = InspectableApp()
    app.frame = GraphFrame()
    app.frame.Show()

    app.MainLoop()
Exemple #7
0
	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()