# HG changeset patch # User Andrey Skvortsov # Date 1496743530 -10800 # Node ID 4571555459228809c39126e616d9470e824f58a7 # Parent dde952da3aa4029c3cdc7b3aab6aacda3bc79019 fix running wxGlade on current Debian systems wxGlade was moved from python import path to /usr/share/wxglade diff -r dde952da3aa4 -r 457155545922 wxglade_hmi/wxglade_hmi.py --- a/wxglade_hmi/wxglade_hmi.py Fri Jun 02 19:58:27 2017 +0300 +++ b/wxglade_hmi/wxglade_hmi.py Tue Jun 06 13:05:30 2017 +0300 @@ -51,9 +51,24 @@ # define name for wxGlade gui file return os.path.join(project_path, "hmi.wxg") + + def GetWxGladePath(self): + path = None + try: + from wxglade import __file__ as fileName + path = os.path.dirname(fileName) + return path + except ImportError: + pass + + defLibDir="/usr/share/wxglade" + if os.path.isdir(defLibDir): + path = defLibDir + + return path + def launch_wxglade(self, options, wait=False): - from wxglade import __file__ as fileName - path = os.path.dirname(fileName) + path = self.GetWxGladePath() glade = os.path.join(path, 'wxglade.py') if wx.Platform == '__WXMSW__': glade = "\"%s\""%glade