Python wx.version() Examples

The following are 8 code examples of wx.version(). 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: __main__.py    From KiCost with MIT License 6 votes vote down vote up
def kicost_version_info():
    version_info_str = r'KiCost v.{}.'.format(__version__)
    version_info_str += r'at Python {}.{}.{}.'.format(
                                                      sys.version_info.major,
                                                      sys.version_info.minor,
                                                      sys.version_info.micro)
    version_info_str += r'on {}({}).'.format(
                                              platform.platform(),
                                              platform.architecture()[0])
    try:
        import wx
        version_info_str += 'Graphical library: {}.'.format(wx.version())
    except:
        version_info_str += 'No graphical library installed for the GUI.'
    #version_info_str += r'\n'
    return version_info_str

###############################################################################
# Command-line interface.
############################################################################### 
Example #2
Source File: wxcef.py    From Librian with Mozilla Public License 2.0 5 votes vote down vote up
def check_versions():
    logging.debug("[wxpython.py] CEF Python {ver}".format(ver=cef.__version__))
    logging.debug("[wxpython.py] Python {ver} {arch}".format(
        ver=platform.python_version(), arch=platform.architecture()[0]))
    logging.debug("[wxpython.py] wxPython {ver}".format(ver=wx.version()))
    # CEF Python version requirement
    assert cef.__version__ >= "66.0", "CEF Python v66.0+ required to run this" 
Example #3
Source File: wxcef.py    From Librian with Mozilla Public License 2.0 5 votes vote down vote up
def OnPreInit(self):
        super(CefApp, self).OnPreInit()
        # On Mac with wxPython 4.0 the OnInit() event never gets
        # called. Doing wx window creation in OnPreInit() seems to
        # resolve the problem (Issue #350).
        if MAC and wx.version().startswith("4."):
            logging.debug("[wxpython.py] OnPreInit: initialize here"
                          " (wxPython 4.0 fix)")
            self.initialize() 
Example #4
Source File: main.py    From admin4 with Apache License 2.0 5 votes vote down vote up
def loadModules(modlist=None):
  adm.mainRevision=0
  adm.mainDate=version.revDate
  
  ignorePaths = [ os.path.abspath(fn) for fn in [sys.argv[0], __file__]]
  names=os.listdir(adm.loaddir)

  for modid in names:
    if modid.startswith('.'):
      continue
    path=os.path.join(adm.loaddir, modid)

    if path in ignorePaths:
      continue
    loadModule(modid, path, modlist) 
Example #5
Source File: notebook.py    From admin4 with Apache License 2.0 5 votes vote down vote up
def Freeze(self):
    return
    # TODO we don't like this
    if not wx.version().endswith(" osx-cocoa") or not wx.version().startswith("3.0"):
      super(Notebook, self).Freeze() 
Example #6
Source File: notebook.py    From admin4 with Apache License 2.0 5 votes vote down vote up
def Thaw(self):
    return
    # TODO we don't like this
    if not wx.version().endswith(" osx-cocoa") or not wx.version().startswith("3.0"):
      super(Notebook, self).Thaw() 
Example #7
Source File: wxpython_toggle.py    From R421A08-rs485-8ch-relay-board with MIT License 5 votes vote down vote up
def OnMenuAbout(self, event):
        info = wx.adv.AboutDialogInfo()
        info.SetName('Relay example GUI')
        if os.path.exists(ICO_PATH):
            info.SetIcon(wx.Icon(ICO_PATH))
        info.SetVersion('v1.0')
        info.SetCopyright('(C) 2018 by Erriez')
        info.SetDescription('Relay example with wxPython {}'.format(wx.version()))
        info.SetWebSite('https://github.com/Erriez/R421A08-rs485-8ch-relay-board',
                        'Source & Documentation')
        info.AddDeveloper('Erriez')
        info.SetLicense('MIT License: Completely and totally open source!')
        wx.adv.AboutBox(info) 
Example #8
Source File: main.py    From admin4 with Apache License 2.0 4 votes vote down vote up
def main(argv):
  adm.app = app
  adm.loaddir=os.path.dirname(os.path.abspath(argv[0]))
  SetLoaddir(adm.loaddir)


  _dn, an=os.path.split(argv[0])
  dot=an.rfind('.')
  if dot > 0:
    adm.appname=an[0:dot]
  else:
    adm.appname=an

  sys.excepthook=LoggerExceptionHook
  if wx.VERSION < (2,9):
    logger.debug("Using old wxPython version %s", wx.version())
  modules=[]

  if sys.platform == "darwin":    macOpt="p"
  else:                           macOpt=""
  opts, args = getopt.getopt(argv[1:], "m:n:%s" % macOpt, ["modules=", "name="])
  for opt in opts:
    if opt[0] in ['-m', '--modules']:
      modules = map(lambda x: "mod%s" % x.capitalize(), opt[1].split(','))
    elif opt[0] in ['-n', '--name']:
      adm.appname=opt[1]
    elif opt[0] == '-p':
      pass
  
  app.SetAppName(adm.appname)
  adm.config=config.Config(adm.appname)
  frame.LoggingDialog.Init()

  adm.appTitle=adm.config.Read("Title", adm.appname.title())
  if wx.VERSION > (2,9):
    app.SetAppDisplayName(adm.appTitle)
    from version import vendor, vendorDisplay
    app.SetVendorName(vendor)
    app.SetVendorDisplayName(vendorDisplay)

  
#  if not modules:
#    modules=adm.config.Read("Modules", [])
  if not modules:
    dot=adm.appname.find('-')
    if dot>0:
      modules=["mod" + adm.appname[:dot].capitalize()]

  loadModules(modules)
  xmlres.init(adm.loaddir)

  adm.mainframe=frame.DetailFrame(None, adm.appTitle, args)
  app.SetTopWindow(adm.mainframe)

  for panelclass in adm.getAllPreferencePanelClasses():
    if hasattr(panelclass, "Init"):
      panelclass.Init()

  adm.mainframe.Show()

  app.MainLoop()