refactor tile_gen in Python

This commit is contained in:
Zsolt Ero
2024-08-27 01:47:34 +02:00
parent 41f49b0743
commit 08d17df476
17 changed files with 352 additions and 273 deletions

View File

@@ -0,0 +1,14 @@
import os
import sys
from pathlib import Path
def python_venv_executable() -> Path:
venv_path = os.environ.get('VIRTUAL_ENV')
if venv_path:
return Path(venv_path) / 'bin' / 'python'
elif sys.prefix != sys.base_prefix:
return Path(sys.prefix) / 'bin' / 'python'
else:
return Path(sys.executable)