rwx/project/__init__.py
2024-02-16 21:31:38 +01:00

13 lines
265 B
Python

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)
return Project(project_root)