--- a/LPCManager.py Thu Jan 26 12:30:52 2017 +0100
+++ b/LPCManager.py Thu Jan 26 12:31:35 2017 +0100
@@ -16,10 +16,10 @@
_beremiz_folder = os.path.join(_dist_folder, "beremiz")
sys.path.append(_beremiz_folder)
+if __name__ == '__main__': + wxversion.select(['2.8', '3.0']) @@ -63,9 +63,13 @@
PLC_module = {'MC9', 'GOT'}
__builtin__.__dict__["BMZ_DBG"] = os.path.exists("LPC_DEBUG")
- app = wx.PySimpleApp(redirect=BMZ_DBG)
+ if wx.VERSION >= (3, 0, 0): + app = wx.App(redirect=BMZ_DBG) + app = wx.PySimpleApp(redirect=BMZ_DBG) app.SetAppName('beremiz')
- wx.InitAllImageHandlers()
+ if wx.VERSION < (3, 0, 0): + wx.InitAllImageHandlers() from util.misc import InstallLocalRessources