def mkdir_p(path):
try:<EOL><INDENT>os.makedirs(path)<EOL><DEDENT>except OSError as exc:<EOL><INDENT>if exc.errno == errno.EEXIST and os.path.isdir(path):<EOL><INDENT>pass<EOL><DEDENT>else: raise<EOL><DEDENT>
mkdir -p: creates path like mkdir -p