rwx/project/__init__.py

14 lines
265 B
Python
Raw Normal View History

2023-10-10 20:11:57 +00:00
import os
class Project:
def __init__(self, root_path: str):
self.root = root_path
def from_root_file(file_path: str):
project_file = os.path.realpath(file_path)
project_root = os.path.dirname(project_file)
2024-02-16 20:31:38 +00:00
return Project(project_root)