X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8feec28c876b20dd98f1c73c694493ab2973226f..b4eecebd423df0c6efe86d7658cd3df818d67ed8:/wxPython/src/_core_ex.py?ds=inline diff --git a/wxPython/src/_core_ex.py b/wxPython/src/_core_ex.py index 2cd3fe4b6f..bb3658d73c 100644 --- a/wxPython/src/_core_ex.py +++ b/wxPython/src/_core_ex.py @@ -30,6 +30,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 @@ -248,7 +266,7 @@ class CallLater: class FutureCall(CallLater): - """A compatibility alias for `FutureCall`.""" + """A compatibility alias for `CallLater`.""" #---------------------------------------------------------------------------- # Control which items in this module should be documented by epydoc.