How to Get the Path of the executing frozen script
问题 If you are running a frozen python script (frozen using py2exe) from a directory and drive different from where the script is present, what is the best way to determine the path of the executing script? Few solutions I have tried inspect.getfile(inspect.currentframe()) Problem: Does not return the full path. It only returns the script name. os.path.abspath( __file__ ) Problem: Doesn't work on Windows os.path.dirname(sys.argv[0]) Problem: Returns empty string. os.path.abspath(inspect