112 if __name__ == '__main__': |
112 if __name__ == '__main__': |
113 __builtin__.__dict__['_'] = lambda x: x |
113 __builtin__.__dict__['_'] = lambda x: x |
114 |
114 |
115 if enablewx: |
115 if enablewx: |
116 try: |
116 try: |
117 import wx, re |
117 import wxversion |
118 from threading import Thread, currentThread |
118 wxversion.select('2.8') |
119 from types import * |
119 import wx |
120 havewx = True |
120 havewx = True |
121 except: |
121 except: |
122 print "Wx unavailable !" |
122 print "Wx unavailable !" |
123 havewx = False |
123 havewx = False |
124 |
124 |
125 if havewx: |
125 if havewx: |
|
126 import re |
|
127 from threading import Thread, currentThread |
|
128 from types import * |
126 app=wx.App(redirect=False) |
129 app=wx.App(redirect=False) |
127 |
130 |
128 # Import module for internationalization |
131 # Import module for internationalization |
129 import gettext |
132 import gettext |
130 |
133 |
131 def Bpath(*args): |
134 def Bpath(*args): |
132 return os.path.join(CWD,*args) |
135 return os.path.join(beremiz_dir,*args) |
133 |
136 |
134 # Get folder containing translation files |
137 # Get folder containing translation files |
135 localedir = os.path.join(CWD,"locale") |
138 localedir = os.path.join(beremiz_dir,"locale") |
136 # Get the default language |
139 # Get the default language |
137 langid = wx.LANGUAGE_DEFAULT |
140 langid = wx.LANGUAGE_DEFAULT |
138 # Define translation domain (name of translation files) |
141 # Define translation domain (name of translation files) |
139 domain = "Beremiz" |
142 domain = "Beremiz" |
140 |
143 |