dabo Commit
Revision 5599
Date: 2010-01-22 06:38:49 -0800 (Fri, 22 Jan 2010)
Author: Paul
Trac: http://trac.dabodev.com/changeset/5599

Changed:
U   trunk/dabo/ui/uiwx/__init__.py

Log:
Added some code to ensure a minimal wx version. Yarko on the Pycon-Org list
had trouble installing Dabo because his system only had wxpython 2.6, and
Dabo bailed on ImportErrors of wx.lib.AUI. Then he installed 2.8.10, but
his system was still selecting wxpython 2.6 instead of 2.8, resulting in
unnecessary spinning of wheels.

This should keep this from happening to future new users.



Diff:
Modified: trunk/dabo/ui/uiwx/__init__.py
===================================================================
--- trunk/dabo/ui/uiwx/__init__.py      2010-01-14 19:43:23 UTC (rev 5598)
+++ trunk/dabo/ui/uiwx/__init__.py      2010-01-22 14:38:49 UTC (rev 5599)
@@ -10,6 +10,14 @@
 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 first thing: check for proper wxPython build:
 _failedLibs = []



_______________________________________________
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]

Reply via email to