Beremiz.py
changeset 1926 d430a67c8462
parent 1924 fc67b02d44e0
child 1935 f2b0d849ea77
--- a/Beremiz.py	Fri Feb 02 16:25:32 2018 +0100
+++ b/Beremiz.py	Mon Feb 05 16:23:51 2018 +0100
@@ -48,6 +48,7 @@
         self.splash = None
         self.splashPath = self.Bpath("images", "splash.png")
         self.modules= ["BeremizIDE"]
+        self.debug = os.path.exists("BEREMIZ_DEBUG")
 
     def Bpath(self, *args):
         return os.path.join(self.app_dir, *args)
@@ -114,12 +115,10 @@
             self.buildpath = args[1]
 
     def CreateApplication(self):
-        BMZ_DBG = os.path.exists("BEREMIZ_DEBUG")
-
         if wx.VERSION >= (3, 0, 0):
-            self.app = wx.App(redirect=BMZ_DBG)
+            self.app = wx.App(redirect=self.debug)
         else:
-            self.app = wx.PySimpleApp(redirect=BMZ_DBG)
+            self.app = wx.PySimpleApp(redirect=self.debug)
 
         self.app.SetAppName('beremiz')
         if wx.VERSION < (3, 0, 0):