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

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

项目:Janet    作者:nosmokingbandit    | 项目源码 | 文件源码
def check_versions():
    print("[wxpython.py] CEF Python {ver}".format(ver=cef.__version__))
    print("[wxpython.py] Python {ver} {arch}".format(
            ver=platform.python_version(), arch=platform.architecture()[0]))
    print("[wxpython.py] wxPython {ver}".format(ver=wx.version()))
    # CEF Python version requirement
    assert cef.__version__ >= "55.3", "CEF Python v55.3+ required to run this"
项目:GRIPy    作者:giruenf    | 项目源码 | 文件源码
def check_dependencies():
    if not 'phoenix' in wx.version():    
        raise Exception('Gripy works only with wxPython 4.')
#
项目:bonsu    作者:bonsudev    | 项目源码 | 文件源码
def OnAbout(self,e):
        description =\
        """Bonsu is a collection of tools and algorithms primarily for the reconstruction of phase information from diffraction intensity measurements."""
        licence =\
        """This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>."""
        if IsNotWX4():
            info = wx.AboutDialogInfo()
        else:
            info = wx.adv.AboutDialogInfo()
        info.SetIcon(wx.Icon(os.path.join(os.path.dirname(os.path.dirname(__file__)),'image',  'bonsu.ico'), wx.BITMAP_TYPE_ICO))
        info.SetName('Bonsu')
        info.SetVersion(__version__)
        info.SetDescription(description)
        info.SetCopyright('Copyright (C) 2011-2017 Marcus C. Newton')
        info.SetWebSite('github.com/bonsudev/bonsu')
        info.SetLicence(licence)
        info.AddDeveloper('Marcus C. Newton')
        self.version_str_list = []
        self.version_str_list.append("Python "+str(sys.version_info.major)+"."+str(sys.version_info.minor)+"."+str(sys.version_info.micro))
        self.version_str_list.append("wxPython "+wx.version())
        self.version_str_list.append("NumPy "+numpy.version.version)
        self.version_str_list.append("VTK "+vtk.vtkVersion().GetVTKVersion())
        self.version_str_list.append("PIL "+Image.VERSION)
        try:
            import h5py
            self.version_str_list.append("h5Py "+h5py.version.version)
        except:
            pass
        self.version_str_list.append("Build date: "+__builddate__)
        info.SetArtists(self.version_str_list)
        dialog = CustomAboutDialog(self,info)
        dialog.ShowModal()
        dialog.Destroy()