这是我的一段代码:
def GetAppPath():
application_path = None
if getattr(sys, 'frozen', False):
application_path = os.path.dirname(sys.executable)
elif __file__:
application_path = os.path.dirname(__file__)
return application_path
在 Windows 上完美运行,但在 Debian 上返回空字符串。任何想法可能是什么问题?
我正在使用 Python 2.7.3、Debian 6.0.5