vault backup: 2025-03-04 11:12:06
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
```python
|
||||
import os
|
||||
import sys
|
||||
|
||||
config_name = 'myapp.cfg'
|
||||
|
||||
# determine if application is a script file or frozen exe
|
||||
if getattr(sys, 'frozen', False):
|
||||
application_path = os.path.dirname(sys.executable)
|
||||
elif __file__:
|
||||
application_path = os.path.dirname(__file__)
|
||||
|
||||
config_path = os.path.join(application_path, config_name)
|
||||
```
|
||||
Reference in New Issue
Block a user