def fichier(): f = Path('/Users/xmillero/python/d03/D03/ex01/dossier/fichier') f.touch()
#!/usr/bin/python3 # coding : utf8 from local_lib.path import Path if __name__ == '__main__': d = Path('/tmp/djangod03') d.mkdir_p() f = Path('/tmp/djangod03/bidon.txt') f.touch() f.open() f.write_text("Coucou\n", append=True) print(f.text())
from local_lib.path import Path if __name__ == '__main__': folder = Path('./forex01') folder.mkdir_p() file = Path('./forex01/forex01.txt') file.touch() file.open() file.write_text("For ex01 text") print(file.text())