Detecting frozen programs¶
See also Locating the executable for another take on this problem.
ThomasHeller posted this tip to the mailing list:
main_is_frozen() returns True when running the exe, and False when
running from a script.
get_main_dir() returns the directory name of the script or the directory
name of the exe - this is also sometimes useful.