2018-07-23 pythonでディレクトリが無ければつくる python import os if not os.path.exists(path_to_dir): os.mkdirs(path_to_dir) os._exists というメソッドもあって、少し詰まっていた。