diff --git a/config.py b/config.py index 4072236d0..2a5071f5e 100644 --- a/config.py +++ b/config.py @@ -51,7 +51,7 @@ def isFrozen(): return False def getPyfaRoot(): - base = sys.executable if isFrozen() else sys.argv[0] + base = getattr(sys.modules['__main__'], "__file__", sys.executable) if isFrozen() else sys.argv[0] root = os.path.dirname(os.path.realpath(os.path.abspath(base))) root = unicode(root, sys.getfilesystemencoding()) return root diff --git a/gui/utils/drawUtils.py b/gui/utils/drawUtils.py index dabd051bf..91e60eb98 100644 --- a/gui/utils/drawUtils.py +++ b/gui/utils/drawUtils.py @@ -34,7 +34,7 @@ def DrawFilledBitmap(width, height, color): def DrawGradientBar(width, height, gStart, gEnd, gMid = None, fillRatio = 4): # we need to have dimensions to draw - assert width > 0 and height > 0 + #assert width > 0 and height > 0 canvas = wx.EmptyBitmap(width,height) mdc = wx.MemoryDC()