diff --git a/legendary/utils/env.py b/legendary/utils/env.py new file mode 100644 index 0000000..669968c --- /dev/null +++ b/legendary/utils/env.py @@ -0,0 +1,10 @@ +import os +import sys + + +def is_pyinstaller(): + return getattr(sys, 'frozen', False) and hasattr(sys, '_MEIPASS') + + +def is_windows_or_pyi(): + return is_pyinstaller() or os.name == 'nt'