Possible Duplicate:
os.path.dirname(__file__) returns empty
Here's my piece of code:
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
Works perfectly on Windows, but returns empty string on Debian. Any ideas what could be the problem?
I'm using Python 2.7.3, Debian 6.0.5