Initial set of tools for editing/running projects

This commit is contained in:
2025-01-18 21:25:27 -06:00
commit e239215895
7 changed files with 126 additions and 0 deletions

15
goat/util.py Normal file
View File

@@ -0,0 +1,15 @@
import os
def find_nearest(path, test):
path = os.path.abspath(path)
while True:
parent_path = os.path.dirname(path)
for entry in os.listdir(path):
if test(entry):
return path
if parent_path == path:
return None
path = parent_path