Python wx.VERSION_STRING Examples
The following are 9
code examples of wx.VERSION_STRING().
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: core.py From wafer_map with GNU General Public License v3.0 | 6 votes |
def version(): """ Returns a string containing version and port info """ if wx.Port == '__WXMSW__': port = 'msw' elif wx.Port == '__WXMAC__': if 'wxOSX-carbon' in wx.PlatformInfo: port = 'osx-carbon' else: port = 'osx-cocoa' elif wx.Port == '__WXGTK__': port = 'gtk' if 'gtk2' in wx.PlatformInfo: port = 'gtk2' elif 'gtk3' in wx.PlatformInfo: port = 'gtk3' else: port = '???' return "%s %s (phoenix)" % (wx.VERSION_STRING, port)
Example #2
Source File: edit_base.py From wxGlade with MIT License | 6 votes |
def destroy_widget(self, level): if self.widget is None: return if misc.currently_under_mouse is self.widget: misc.currently_under_mouse = None self.widget.Hide() if wx.VERSION_STRING!="2.8.12.0": # unbind events to prevent new created (and queued) events self.widget.Bind(wx.EVT_PAINT, None) self.widget.Bind(wx.EVT_RIGHT_DOWN, None) self.widget.Bind(wx.EVT_LEFT_DOWN, None) self.widget.Bind(wx.EVT_MIDDLE_DOWN, None) self.widget.Bind(wx.EVT_ENTER_WINDOW, None) self.widget.Bind(wx.EVT_LEAVE_WINDOW, None) self.widget.Bind(wx.EVT_KEY_DOWN, None) compat.DestroyLater(self.widget) self.widget = None if misc.focused_widget is self: misc.set_focused_widget(None)
Example #3
Source File: backend_wx.py From Computable with MIT License | 5 votes |
def __init__(self, bitmap, dpi): """ Initialise a wxWindows renderer instance. """ RendererBase.__init__(self) DEBUG_MSG("__init__()", 1, self) if wx.VERSION_STRING < "2.8": raise RuntimeError("matplotlib no longer supports wxPython < 2.8 for the Wx backend.\nYou may, however, use the WxAgg backend.") self.width = bitmap.GetWidth() self.height = bitmap.GetHeight() self.bitmap = bitmap self.fontd = {} self.dpi = dpi self.gc = None
Example #4
Source File: backend_wx.py From matplotlib-4-abaqus with MIT License | 5 votes |
def __init__(self, bitmap, dpi): """ Initialise a wxWindows renderer instance. """ RendererBase.__init__(self) DEBUG_MSG("__init__()", 1, self) if wx.VERSION_STRING < "2.8": raise RuntimeError("matplotlib no longer supports wxPython < 2.8 for the Wx backend.\nYou may, however, use the WxAgg backend.") self.width = bitmap.GetWidth() self.height = bitmap.GetHeight() self.bitmap = bitmap self.fontd = {} self.dpi = dpi self.gc = None
Example #5
Source File: backend_wx.py From neural-network-animation with MIT License | 5 votes |
def __init__(self, bitmap, dpi): """ Initialise a wxWindows renderer instance. """ RendererBase.__init__(self) DEBUG_MSG("__init__()", 1, self) if wx.VERSION_STRING < "2.8": raise RuntimeError("matplotlib no longer supports wxPython < 2.8 for the Wx backend.\nYou may, however, use the WxAgg backend.") self.width = bitmap.GetWidth() self.height = bitmap.GetHeight() self.bitmap = bitmap self.fontd = {} self.dpi = dpi self.gc = None
Example #6
Source File: backend_wx.py From ImageFusion with MIT License | 5 votes |
def __init__(self, bitmap, dpi): """ Initialise a wxWindows renderer instance. """ RendererBase.__init__(self) DEBUG_MSG("__init__()", 1, self) if wx.VERSION_STRING < "2.8": raise RuntimeError("matplotlib no longer supports wxPython < 2.8 for the Wx backend.\nYou may, however, use the WxAgg backend.") self.width = bitmap.GetWidth() self.height = bitmap.GetHeight() self.bitmap = bitmap self.fontd = {} self.dpi = dpi self.gc = None
Example #7
Source File: objdictedit.py From CANFestivino with GNU Lesser General Public License v2.1 | 5 votes |
def AddExceptHook(path, app_version='[No version]'):#, ignored_exceptions=[]): def handle_exception(e_type, e_value, e_traceback): traceback.print_exception(e_type, e_value, e_traceback) # this is very helpful when there's an exception in the rest of this func last_tb = get_last_traceback(e_traceback) ex = (last_tb.tb_frame.f_code.co_filename, last_tb.tb_frame.f_lineno) if str(e_value).startswith("!!!"): Display_Error_Dialog(e_value) elif ex not in ignored_exceptions: ignored_exceptions.append(ex) result = Display_Exception_Dialog(e_type,e_value,e_traceback) if result: info = { 'app-title' : wx.GetApp().GetAppName(), # app_title 'app-version' : app_version, 'wx-version' : wx.VERSION_STRING, 'wx-platform' : wx.Platform, 'python-version' : platform.python_version(), #sys.version.split()[0], 'platform' : platform.platform(), 'e-type' : e_type, 'e-value' : e_value, 'date' : time.ctime(), 'cwd' : os.getcwd(), } if e_traceback: info['traceback'] = ''.join(traceback.format_tb(e_traceback)) + '%s: %s' % (e_type, e_value) last_tb = get_last_traceback(e_traceback) exception_locals = last_tb.tb_frame.f_locals # the locals at the level of the stack trace where the exception actually occurred info['locals'] = format_namespace(exception_locals) if 'self' in exception_locals: info['self'] = format_namespace(exception_locals['self'].__dict__) output = open(path+os.sep+"bug_report_"+info['date'].replace(':','-').replace(' ','_')+".txt",'w') lst = info.keys() lst.sort() for a in lst: output.write(a+":\n"+str(info[a])+"\n\n") #sys.excepthook = lambda *args: wx.CallAfter(handle_exception, *args) sys.excepthook = handle_exception
Example #8
Source File: networkedit.py From CANFestivino with GNU Lesser General Public License v2.1 | 5 votes |
def AddExceptHook(path, app_version='[No version]'):#, ignored_exceptions=[]): def handle_exception(e_type, e_value, e_traceback): traceback.print_exception(e_type, e_value, e_traceback) # this is very helpful when there's an exception in the rest of this func last_tb = get_last_traceback(e_traceback) ex = (last_tb.tb_frame.f_code.co_filename, last_tb.tb_frame.f_lineno) if str(e_value).startswith("!!!"): Display_Error_Dialog(e_value) elif ex not in ignored_exceptions: ignored_exceptions.append(ex) result = Display_Exception_Dialog(e_type,e_value,e_traceback) if result: info = { 'app-title' : wx.GetApp().GetAppName(), # app_title 'app-version' : app_version, 'wx-version' : wx.VERSION_STRING, 'wx-platform' : wx.Platform, 'python-version' : platform.python_version(), #sys.version.split()[0], 'platform' : platform.platform(), 'e-type' : e_type, 'e-value' : e_value, 'date' : time.ctime(), 'cwd' : os.getcwd(), } if e_traceback: info['traceback'] = ''.join(traceback.format_tb(e_traceback)) + '%s: %s' % (e_type, e_value) last_tb = get_last_traceback(e_traceback) exception_locals = last_tb.tb_frame.f_locals # the locals at the level of the stack trace where the exception actually occurred info['locals'] = format_namespace(exception_locals) if 'self' in exception_locals: info['self'] = format_namespace(exception_locals['self'].__dict__) output = open(path+os.sep+"bug_report_"+info['date'].replace(':','-').replace(' ','_')+".txt",'w') lst = info.keys() lst.sort() for a in lst: output.write(a+":\n"+str(info[a])+"\n\n") #sys.excepthook = lambda *args: wx.CallAfter(handle_exception, *args) sys.excepthook = handle_exception
Example #9
Source File: AboutDialog.py From EventGhost with GNU General Public License v2.0 | 4 votes |
def __init__(self, parent): from eg.WinApi.SystemInformation import GetWindowsVersionString buildTime = time.strftime( Text.CreationDate, time.gmtime(eg.Version.buildTime) ).decode(eg.systemEncoding) totalMemory = GetRam()[0] pythonVersion = "%d.%d.%d %s %d" % tuple(sys.version_info) if is_stackless: pythonVersion = "Stackless Python " + pythonVersion self.sysInfos = [ "Software", ("Program Version", eg.Version.string), ("Build Time", buildTime), ("Python Version", pythonVersion), ("wxPython Version", wx.VERSION_STRING), "\nSystem", ("Operating System", GetWindowsVersionString()), ("CPU", GetCpuName()), ("RAM", "%s GB" % totalMemory), "\nUSB-Devices", ] devices = eg.WinUsb.ListDevices() for hardwareId in sorted(devices.keys()): device = devices[hardwareId] self.sysInfos.append((device.name, device.hardwareId)) lines = [] for line in self.sysInfos: if isinstance(line, tuple): lines.append('<tr><td>%s:</td><td>%s</td></tr>' % line) else: lines.append('</table><p><b>%s</b><br><table>' % line) lines.append('</table>') page = "\n".join(lines) HtmlPanel.__init__(self, parent, page) self.htmlWindow.Bind(wx.EVT_RIGHT_DOWN, self.OnRightClick) self.htmlWindow.Bind(wx.EVT_KEY_DOWN, self.OnKeyDown) contextMenu = wx.Menu() contextMenu.Append(wx.ID_COPY, eg.text.MainFrame.Menu.Copy) self.Bind(wx.EVT_MENU, self.OnCmdCopy, id=wx.ID_COPY) self.contextMenu = contextMenu