os.makedirs doesn’t understand “~” in my path

You need to expand the tilde manually:

my_dir = os.path.expanduser('~/some_dir')

Leave a Comment