]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/gtk/_core.py
2.7 --> 2.8
[wxWidgets.git] / wxPython / src / gtk / _core.py
index a5fd95817060008634684409218dbb063680c907..6bee06db91e92496ccd7fa07eff0cf5d4c9cba8e 100644 (file)
@@ -13658,6 +13658,24 @@ if RELEASE_VERSION != _core_.RELEASE_VERSION:
     import warnings
     warnings.warn("wxPython/wxWidgets release number mismatch")
 
+
+def version():
+    """Returns a string containing version and port info"""
+    ctype = wx.USE_UNICODE and 'unicode' or 'ansi'
+    if wx.Platform == '__WXMSW__':
+        port = 'msw'
+    elif wx.Platform == '__WXMAC__':
+        port = 'mac'
+    elif wx.Platform == '__WXGTK__':
+        port = 'gtk'
+        if 'gtk2' in wx.PlatformInfo:
+            port = 'gtk2'
+    else:
+        port = '?'
+
+    return "%s (%s-%s)" % (wx.VERSION_STRING, port, ctype)
+                       
+    
 #----------------------------------------------------------------------------
 
 # Set wxPython's default string<-->unicode conversion encoding from