You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
eeeeeeeeeeee
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 !'