I have a small Python program I am making available as a py file, but also as a standalone pyz and exe (via pyinstaller) files, which contain all dependencies.
When displaying licence information in the pyz or exe, I need to include extra statements regarding the dependencies I'm including.
How can I differentiate if the program is running as a py, pyz, or exe in order to display difference licences?
.
I've found this response to a different question, which may help for the exe: https://stackoverflow.com/a/404750/36061
if getattr(sys, 'frozen', False):
print(EXE_LICENCE)
else:
print(NORMAL_LICENCE)