mirror of
https://github.com/NovaOSS/nova-api.git
synced 2024-11-29 10:03:56 +01:00
12 lines
299 B
Python
12 lines
299 B
Python
import os
|
|
|
|
def find_project_root():
|
|
current_path = os.getcwd()
|
|
while not os.path.isfile(os.path.join(current_path, 'LICENSE')):
|
|
current_path = os.path.dirname(current_path)
|
|
return current_path
|
|
|
|
root = find_project_root()
|
|
|
|
if __name__ == '__main__':
|
|
print(find_project_root()) |