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.

utils.py 293 B

1234567891011
  1. import os
  2. import os.path
  3. def cs_path_exists(fspath):
  4. if not os.path.exists(fspath):
  5. return False
  6. # make absolute so we always have a directory
  7. abspath = os.path.abspath(fspath)
  8. directory, filename = os.path.split(abspath)
  9. return filename in os.listdir(directory)