Utility Functions
get_production_path()
get_production_path()
Returns the path to resource files in a production environment.
Parameters
None
Return Value
Optional[str]
: Returns the path to resource files in a production environment. ReturnsNone
if running as a regular Python script.
Description
This function checks if the current execution environment is a production environment (e.g., an executable built with PyInstaller) and returns the path to resource files if it is. Returns None
if running as a regular Python script.
Example Usage
is_production()
is_production()
Checks if the current environment is a production environment.
Parameters
None
Return Value
bool
: ReturnsTrue
if it is a production environment, otherwise returnsFalse
.
Description
This function checks if the current execution environment is a production environment (e.g., an executable built with PyInstaller) by examining the sys.frozen
attribute.
Example Usage
Last updated