def module_path():
""" This will get us the program's directory,
even if we are frozen using py2exe"""
if we_are_frozen():
print "Apparently running from the executable."
return os.path.dirname(unicode(sys.executable, sys.getfilesystemencoding( )))
return os.path.dirname(unicode(__file__, sys.getfilesystemencoding( )))
评论列表
文章目录