|
@@ -49,8 +49,11 @@ def CheckWxVersion(version = [2, 8, 11, 0]):
|
|
|
|
|
|
return True
|
|
return True
|
|
|
|
|
|
-def CheckForWx():
|
|
|
|
- """Try to import wx module and check its version"""
|
|
|
|
|
|
+def CheckForWx(forceVersion = None):
|
|
|
|
+ """Try to import wx module and check its version
|
|
|
|
+
|
|
|
|
+ :param forceVersion: force wxPython version, eg. '2.8'
|
|
|
|
+ """
|
|
if 'wx' in sys.modules.keys():
|
|
if 'wx' in sys.modules.keys():
|
|
return
|
|
return
|
|
|
|
|
|
@@ -60,7 +63,8 @@ def CheckForWx():
|
|
import wxversion
|
|
import wxversion
|
|
except ImportError as e:
|
|
except ImportError as e:
|
|
raise ImportError(e)
|
|
raise ImportError(e)
|
|
- # wxversion.select(str(minVersion[0]) + '.' + str(minVersion[1]))
|
|
|
|
|
|
+ if forceVersion:
|
|
|
|
+ wxversion.select(forceVersion)
|
|
wxversion.ensureMinimal(str(minVersion[0]) + '.' + str(minVersion[1]))
|
|
wxversion.ensureMinimal(str(minVersion[0]) + '.' + str(minVersion[1]))
|
|
import wx
|
|
import wx
|
|
version = wx.version().split(' ')[0]
|
|
version = wx.version().split(' ')[0]
|