Fichier ou dossier ?
os.path.isdir("/tmp/toto")
os.path.isfile("/tmp/tata")
os.path.rename("/tmp/toto","/tmp/tata")
os.path.basename("/tmp/toto/fichier.txt")
os.path.dirname("/tmp/toto/fichier.txt")
os.path.split("/tmp/toto/fichier.txt")
os.path.splitext("/tmp/toto/fichier.txt")
os.path.exists("/tmp/toto/fichier.txt")