Skip to content

Instantly share code, notes, and snippets.

@ceshine
Created November 2, 2017 01:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ceshine/e5c6553f239ab6dbf079203a17324be8 to your computer and use it in GitHub Desktop.
Save ceshine/e5c6553f239ab6dbf079203a17324be8 to your computer and use it in GitHub Desktop.
Create a folder if not exists with pathlib
import pathlib
output_folder = "tmp/folder"
pathlib.Path(output_folder).mkdir(parents=True, exist_ok=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment