We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
A simple way to ensure all subdirectories exist:
def ensure_dirs_exists(filenames): subdirs = {os.path.dirname(s) for s in filenames} subdirs = [ s for s in subdirs if s != '' ] subdirs.sort(key=len) for s in subdirs: if not os.path.exists(s): os.mkdir(s)
How about some non ascii string like 'buen día ñoño !'
Oh, ^ looks good.
Test.