mirror of
https://github.com/derrod/legendary.git
synced 2024-12-22 17:55:27 +00:00
[utils] Add helper to determine if running PyInstaller package
This commit is contained in:
parent
39bfa3df15
commit
43bb09a1ad
10
legendary/utils/env.py
Normal file
10
legendary/utils/env.py
Normal file
|
@ -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'
|
Loading…
Reference in a new issue