Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

14 lignes
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))