Python wx 模块,InitAllImageHandlers() 实例源码

我们从Python开源项目中,提取了以下11个代码示例,用于说明如何使用wx.InitAllImageHandlers()

项目:beremiz    作者:nucleron    | 项目源码 | 文件源码
def CreateApplication(self):
        if os.path.exists("BEREMIZ_DEBUG"):
            __builtin__.__dict__["BMZ_DBG"] = True
        else:
            __builtin__.__dict__["BMZ_DBG"] = False

        global wx
        import wx

        if wx.VERSION >= (3, 0, 0):
            self.app = wx.App(redirect=BMZ_DBG)
        else:
            self.app = wx.PySimpleApp(redirect=BMZ_DBG)

        self.app.SetAppName('beremiz')
        if wx.VERSION < (3, 0, 0):
            wx.InitAllImageHandlers()

        self.ShowSplashScreen()
        self.BackgroundInitialization()
        self.app.MainLoop()
项目:ChiantiPy    作者:chianti-atomic    | 项目源码 | 文件源码
def __do_layout(self):
        # begin wxGlade: ui_choice2Dialog.__do_layout
        sizer_1 = wx.BoxSizer(wx.HORIZONTAL)
        sizer_3 = wx.BoxSizer(wx.VERTICAL)
        sizer_2 = wx.BoxSizer(wx.VERTICAL)
        sizer_2.Add(self.numListBox, 1, wx.ALL|wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 20)
        sizer_2.Add(self.button_ok, 0, wx.ALL|wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 10)
        sizer_1.Add(sizer_2, 1, wx.EXPAND, 0)
        sizer_3.Add(self.denListBox, 1, wx.ALL|wx.EXPAND|wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 20)
        sizer_3.Add(self.button_cancel, 0, wx.ALL|wx.ALIGN_CENTER_HORIZONTAL|wx.ALIGN_CENTER_VERTICAL, 10)
        sizer_1.Add(sizer_3, 1, wx.EXPAND, 0)
        self.SetSizer(sizer_1)
        self.Layout()
        # end wxGlade

# end of class ui_choice2Dialog


#if __name__ == "__main__":
    #app = wx.PySimpleApp(0)
    #wx.InitAllImageHandlers()
    #ChiantiPy = ui_choice2Dialog(None, -1, "")
    #app.SetTopWindow(ChiantiPy)
    #ChiantiPy.Show()
    #app.MainLoop()
项目:squaremap3    作者:kawaiicthulhu    | 项目源码 | 文件源码
def OnInit(self):
        """Initialise the application"""
        wx.InitAllImageHandlers()
        self.frame = frame = wx.Frame( None,
        )
        frame.CreateStatusBar()

        model = model = self.get_model( sys.argv[1])
        self.sq = SquareMap( frame, model=model)
        EVT_SQUARE_HIGHLIGHTED( self.sq, self.OnSquareSelected )
        frame.Show(True)
        self.SetTopWindow(frame)
        return True
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def __test():
    class MyApp(wx.App):
        def OnInit(self):
            wx.InitAllImageHandlers()
            frame = TestFrame(None, -1, "PlotCanvas")
            # frame.Show(True)
            self.SetTopWindow(frame)
            return True
    app = MyApp(0)
    app.MainLoop()
项目:Jackal_Velodyne_Duke    作者:MengGuo    | 项目源码 | 文件源码
def OnInit(self):
        wx.InitAllImageHandlers()
        frame_terminal = TerminalFrame(None, -1, "")
        self.SetTopWindow(frame_terminal)
        frame_terminal.Show(True)
        return 1

# end of class MyApp
项目:Jackal_Velodyne_Duke    作者:MengGuo    | 项目源码 | 文件源码
def OnInit(self):
        wx.InitAllImageHandlers()

        ser = serial.Serial()
        print(ser)
        # loop until cancel is pressed, old values are used as start for the next run
        # show the different views, one after the other
        # value are kept.
        for flags in (SHOW_BAUDRATE, SHOW_FLOW, SHOW_FORMAT, SHOW_TIMEOUT, SHOW_ALL):
            dialog_serial_cfg = SerialConfigDialog(None, -1, "", serial=ser, show=flags)
            self.SetTopWindow(dialog_serial_cfg)
            result = dialog_serial_cfg.ShowModal()
            print(ser)
            if result != wx.ID_OK:
                break
        # the user can play around with the values, CANCEL aborts the loop
        while True:
            dialog_serial_cfg = SerialConfigDialog(None, -1, "", serial=ser)
            self.SetTopWindow(dialog_serial_cfg)
            result = dialog_serial_cfg.ShowModal()
            print(ser)
            if result != wx.ID_OK:
                break
        return 0

# end of class MyApp
项目:btc-fpga-miner    作者:marsohod4you    | 项目源码 | 文件源码
def OnInit(self):
        wx.InitAllImageHandlers()
        frame_terminal = TerminalFrame(None, -1, "")
        self.SetTopWindow(frame_terminal)
        frame_terminal.Show(1)
        return 1

# end of class MyApp
项目:btc-fpga-miner    作者:marsohod4you    | 项目源码 | 文件源码
def OnInit(self):
        wx.InitAllImageHandlers()

        ser = serial.Serial()
        print ser
        #loop until cancel is pressed, old values are used as start for the next run
        #show the different views, one after the other
        #value are kept.
        for flags in (SHOW_BAUDRATE, SHOW_FLOW, SHOW_FORMAT, SHOW_TIMEOUT, SHOW_ALL):
            dialog_serial_cfg = SerialConfigDialog(None, -1, "", serial=ser, show=flags)
            self.SetTopWindow(dialog_serial_cfg)
            result = dialog_serial_cfg.ShowModal()
            print ser
            if result != wx.ID_OK:
                break
        #the user can play around with the values, CANCEL aborts the loop
        while 1:
            dialog_serial_cfg = SerialConfigDialog(None, -1, "", serial=ser)
            self.SetTopWindow(dialog_serial_cfg)
            result = dialog_serial_cfg.ShowModal()
            print ser
            if result != wx.ID_OK:
                break
        return 0

# end of class MyApp
项目:BigBrotherBot-For-UrT43    作者:ptitbigorneau    | 项目源码 | 文件源码
def OnInit(self):
        """Initialise the application"""
        wx.InitAllImageHandlers()
        self.frame = frame = wx.Frame( None,
        )
        frame.CreateStatusBar()

        model = model = self.get_model( sys.argv[1]) 
        self.sq = SquareMap( frame, model=model)
        EVT_SQUARE_HIGHLIGHTED( self.sq, self.OnSquareSelected )
        frame.Show(True)
        self.SetTopWindow(frame)
        return True
项目:BigBrotherBot-For-UrT43    作者:ptitbigorneau    | 项目源码 | 文件源码
def OnInit(self, file=None):
        """Initialise the application"""
        wx.InitAllImageHandlers()
        frame = MainFrame()
        frame.Show(True)
        self.SetTopWindow(frame)
        if file is not None:
            wx.CallAfter(frame.load, file)
        elif sys.argv[1:]:
            wx.CallAfter(frame.load, *sys.argv[1:])
        return True
项目:dxf2gcode    作者:cnc-club    | 项目源码 | 文件源码
def OnInit(self):
            wx.InitAllImageHandlers()
            DrawFrame = BuildDrawFrame()
            frame = DrawFrame(None, -1, "FloatCanvas Demo App",wx.DefaultPosition,(700,700))

            self.SetTopWindow(frame)
            frame.Show()

            ## check to see if the demo is set to start in a particular mode.
            ## fixme: should this be in a dict instead?
            if StartUpDemo == "text":
                frame.TestText()
            elif StartUpDemo == "stext":
                frame.TestScaledText()
            elif StartUpDemo == "stextbox":
                frame.TestScaledTextBox()
            elif StartUpDemo == "bitmap":
                frame.TestBitmap()
            elif StartUpDemo == "all":
                frame.DrawTest()
            elif StartUpDemo == "map":
                frame.DrawMap()
            elif StartUpDemo == "hit":
                frame.TestHitTest()
            elif StartUpDemo == "hitf":
                frame.TestHitTestForeground()
            elif StartUpDemo == "animate":
                frame.TestAnimation()
            elif StartUpDemo == "speed":
                frame.SpeedTest()
            elif StartUpDemo == "temp":
                frame.TempTest()
            elif StartUpDemo == "props":
                frame.PropertiesChangeTest()
            elif StartUpDemo == "arrow":
                frame.ArrowTest()
            elif StartUpDemo == "arrowline":
                frame.ArrowLineTest()
            elif StartUpDemo == "hide":
                frame.HideTest()

            return True