dabo Commit
Revision 5607
Date: 2010-01-28 16:21:42 -0800 (Thu, 28 Jan 2010)
Author: Paul
Trac: http://trac.dabodev.com/changeset/5607
Changed:
U trunk/dabo/ui/uiwx/__init__.py
Log:
Fixed the ensureMinimal() to only execute if wx hasn't already been imported,
and if we aren't running frozen. I got surprised testing my app right now after
building it with py2exe - I received the wxPython message that wxPython isn't
the right version because wxversion checks the filesystem and not the bundled
PYTHONPATH.
Diff:
Modified: trunk/dabo/ui/uiwx/__init__.py
===================================================================
--- trunk/dabo/ui/uiwx/__init__.py 2010-01-28 17:05:42 UTC (rev 5606)
+++ trunk/dabo/ui/uiwx/__init__.py 2010-01-29 00:21:42 UTC (rev 5607)
@@ -10,13 +10,15 @@
import warnings
from dabo.dLocalize import _
-# Very VERY first thing: ensure a minimal wx is selected:
-minWx = "2.8"
-try:
- import wxversion
-except ImportError:
- sys.exit("wxPython needs to be at least version %s." % minWx)
-wxversion.ensureMinimal(minWx)
+# Very VERY first thing: ensure a minimal wx is selected, but only if
+# wx hasn't already been imported, and if we aren't running frozen:
+if 'wx' not in sys.modules and not getattr(sys, "frozen", False):
+ minWx = "2.8"
+ try:
+ import wxversion
+ except ImportError:
+ sys.exit("wxPython needs to be at least version %s." % minWx)
+ wxversion.ensureMinimal(minWx)
######################################################
# Very first thing: check for proper wxPython build:
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message:
http://leafe.com/archives/byMID/[email protected]