Python wx.PySimpleApp() Examples

The following are 8 code examples of wx.PySimpleApp(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module wx , or try the search function .
Example #1
Source File: Input_Dialog_LAST.py    From topoflow with MIT License 6 votes vote down vote up
def on_Help2(self, event):
        
        #-----------------------------------------------
        #  Event handler for the Help button.
        #  Alternate method that uses HTML_Help_Window
        #  class, defined below.
        #-----------------------------------------------
        app   = wx.PySimpleApp()
        frame = HTML_Help_Window(parent=None,
                                 title="HTML Help System",
                                 html_file=self.help_file)
        frame.Show()
        app.MainLoop()

    #   on_Help2()       
    #---------------------------------------------------------------- 
Example #2
Source File: wx_ctrl_phoenix.py    From pybass with Apache License 2.0 5 votes vote down vote up
def show_hide_aui_pane_info(self, name):
			if self.aui_manager.GetPane(name).IsShown():
				self.aui_manager.GetPane(name).Hide()
			else:
				self.aui_manager.GetPane(name).Show()
			self.aui_manager.Update()

	#~ class application(wx.PySimpleApp): 
Example #3
Source File: guisupport.py    From Computable with MIT License 5 votes vote down vote up
def get_app_wx(*args, **kwargs):
    """Create a new wx app or return an exiting one."""
    import wx
    app = wx.GetApp()
    if app is None:
        if 'redirect' not in kwargs:
            kwargs['redirect'] = False
        app = wx.PySimpleApp(*args, **kwargs)
    return app 
Example #4
Source File: GoSync.py    From gosync with GNU General Public License v2.0 5 votes vote down vote up
def main():
    os.chdir(APP_PATH)
#    app = wx.PySimpleApp() : Deprecated
    app = wx.App(False)
    controller = GoSyncController()
    controller.Center()
    controller.Show()
    app.MainLoop() 
Example #5
Source File: advanced_config_unittest.py    From pyFileFixity with MIT License 5 votes vote down vote up
def buildWindow(self):
    app = wx.PySimpleApp()
    module_name = os.path.split(sys.argv[0])[-1]
    frame = wx.Frame(None, -1, module_name, size=(640, 480))

    panel = advanced_config.AdvancedConfigPanel(frame, ClientApp(self.parser))
    frame.Show()
    app.MainLoop() 
Example #6
Source File: Beremiz.py    From OpenPLC_Editor with GNU General Public License v3.0 5 votes vote down vote up
def CreateApplication(self):

        BeremizAppType = wx.App if wx.VERSION >= (3, 0, 0) else wx.PySimpleApp

        class BeremizApp(BeremizAppType):
            def OnInit(_self):  # pylint: disable=no-self-argument
                self.ShowSplashScreen()
                return True

        self.app = BeremizApp(redirect=self.debug)
        self.app.SetAppName('beremiz')
        if wx.VERSION < (3, 0, 0):
            wx.InitAllImageHandlers() 
Example #7
Source File: mki18n.py    From OpenPLC_Editor with GNU General Public License v3.0 5 votes vote down vote up
def getlanguageDict():
    languageDict = {}
    getSupportedLanguageDict('Beremiz')
    if wx.VERSION >= (3, 0, 0):
        _app = wx.App()
    else:
        _app = wx.PySimpleApp()

    for lang in [x for x in dir(wx) if x.startswith("LANGUAGE")]:
        i = wx.Locale(wx.LANGUAGE_DEFAULT).GetLanguageInfo(getattr(wx, lang))
        if i:
            languageDict[i.CanonicalName] = i.Description

    return languageDict 
Example #8
Source File: Input_Dialog_LAST.py    From topoflow with MIT License 4 votes vote down vote up
def Get_Input_Vars():

    #------------------------------------------------------
    # Note:  This is for testing.  It creates two dialogs
    #        that are identical, on top of each other.
    #        Change values in the top one (the child) and
    #        then click on its Start button.  The child
    #        dialog closes.  Now click on the Help button
    #        of the remaining (parent) to print out some
    #        of the stored values.  Later on, the parent
    #        will be the TopoFlow main wizard.
    #------------------------------------------------------
    # Note:  You need to comment out the last few lines
    #        in this file before using this function.
    #------------------------------------------------------
    
    #----------------------------------
    # Open a TopoFlow input dialog as
    # the "main program window"
    #----------------------------------
    app = wx.PySimpleApp()
    frame1 = TF_Input_Dialog(xml_file="xml/snowmelt_degree_day.xml")
    frame1.Show()

    #--------------------------------------------------
    # Open a 2nd dialog that has frame1 as its parent
    # and which will store its values into its parent
    # before it is destroyed.
    #--------------------------------------------------
    frame2 = TF_Input_Dialog(parent=frame1, \
                             xml_file="xml/snowmelt_degree_day.xml")
    frame2.Show()

    #-----------------------
    # Start the event loop
    #-----------------------
    app.MainLoop()
    
#   Get_Input_Vars()
#-------------------------------------------------------------    
        
#---------------------------------------
#  Support two different usage options
#---------------------------------------