|
@@ -23,8 +23,15 @@ import locale
|
|
|
import gettext
|
|
|
gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode=True)
|
|
|
|
|
|
+# wxversion.select() called once at the beginning
|
|
|
+check = True
|
|
|
+
|
|
|
def CheckForWx():
|
|
|
"""Try to import wx module and check its version"""
|
|
|
+ global check
|
|
|
+ if not check:
|
|
|
+ return
|
|
|
+
|
|
|
minVersion = [2, 8, 1, 1]
|
|
|
try:
|
|
|
import wxversion
|
|
@@ -42,6 +49,8 @@ def CheckForWx():
|
|
|
print >> sys.stderr, "Unable to set locale:", e
|
|
|
os.environ['LC_ALL'] = ''
|
|
|
|
|
|
+ check = False
|
|
|
+
|
|
|
CheckForWx()
|
|
|
import wx
|
|
|
import wx.lib.flatnotebook as FN
|