本文整理汇总了Python中wx.version方法的典型用法代码示例。如果您正苦于以下问题:Python wx.version方法的具体用法?Python wx.version怎么用?Python wx.version使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wx
的用法示例。
在下文中一共展示了wx.version方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: kicost_version_info
# 需要导入模块: import wx [as 别名]
# 或者: from wx import version [as 别名]
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.
###############################################################################
示例2: check_versions
# 需要导入模块: import wx [as 别名]
# 或者: from wx import version [as 别名]
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"
示例3: OnPreInit
# 需要导入模块: import wx [as 别名]
# 或者: from wx import version [as 别名]
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()
示例4: loadModules
# 需要导入模块: import wx [as 别名]
# 或者: from wx import version [as 别名]
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)
示例5: Freeze
# 需要导入模块: import wx [as 别名]
# 或者: from wx import version [as 别名]
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()
示例6: Thaw
# 需要导入模块: import wx [as 别名]
# 或者: from wx import version [as 别名]
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()
示例7: OnMenuAbout
# 需要导入模块: import wx [as 别名]
# 或者: from wx import version [as 别名]
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)
示例8: main
# 需要导入模块: import wx [as 别名]
# 或者: from wx import version [as 别名]
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()