mirror of
https://github.com/aclist/dztui.git
synced 2026-10-30 22:52:42 +01:00
feat: dzgui 7 alpha
This commit is contained in:
1 parent
1acdbd58c5
commit
2e5b771137
150 files changed
+10359
No files matched your search
@@ -0,0 +1,23 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
from importlib import metadata
|
||||
from pathlib import Path
|
||||
|
||||
from dzgui.const.constants import APP_NAME_LOWER
|
||||
|
||||
def is_prefix_writeable() -> bool:
|
||||
prefix = sys.prefix
|
||||
path = Path(prefix)
|
||||
file = path / ".is_writeable"
|
||||
try:
|
||||
with open(file, "w") as f:
|
||||
f.write("")
|
||||
os.remove(file)
|
||||
except OSError:
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
def get_version() -> str:
|
||||
return metadata.version(APP_NAME_LOWER)
|
||||
Reference in new issue
Block a user