rwx/project/__init__.py
2023-10-10 22:11:57 +02:00

13 lines
262 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(real_file)