Public Questions for tag [directory]

Ask Question

1 questions


0

Vote

4

Answers

33

View

What is the most elegant way to check if the directory a file is going to be written to exists, and if not, create the directory using Python? Here is what I tried:import os file_path = "/my/direct

Jan 18