You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
279B

  1. import os
  2. def get_base_path():
  3. marker_file = "run.py"
  4. current_path = os.getcwd()
  5. while current_path != 0:
  6. if marker_file in os.listdir(current_path):
  7. return current_path
  8. current_path = os.path.dirname(os.path.normpath(current_path))