]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/misc/wxprojview.py
Eliminated a VC++ 8 warning
[wxWidgets.git] / wxPython / misc / wxprojview.py
index 5b002df75e18b1b242714f81553dec8e28618a46..81abde5c1a34f26022a5efb5551fe6fc9d546793 100755 (executable)
@@ -1,4 +1,11 @@
 #!/usr/bin/env python
+#----------------------------------------------------------------------
+#
+#  A little app I use on my system to help me remember which version of
+#  wx I am corrently working on.  I don't expect this to work for anybody
+#  else as it uses things that are specific to my setup.
+#
+#----------------------------------------------------------------------
 
 import wx
 import wx.lib.stattext as st
@@ -42,9 +49,12 @@ class MyFrame(wx.Frame):
 
 
     def OnUpdateVersion(self, evt):
-        ver = '??'
+        ver = '?.?'
         if 'wxMSW' in wx.PlatformInfo:
-            pass
+            info = open("c:/wxcurenv").read()
+            p1 = info.find("WXCUR=") + 6
+            p2 = info.find("\n", p1)
+            ver = info[p1:p2]
         else:
             link = '/opt/wx/current'
             if os.path.islink(link):