X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/846c181ba2724c0333ddf15708f640a919078de2..5917d04127f414f0c2cd400581cb1c47395a3479:/wxPython/src/_core_ex.py diff --git a/wxPython/src/_core_ex.py b/wxPython/src/_core_ex.py index cf46d72114..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