def mkdir_p(path):
try:<EOL><INDENT>os.makedirs(path)<EOL><DEDENT>except OSError as err:<EOL><INDENT>if err.errno != errno.EEXIST:<EOL><INDENT>raise<EOL><DEDENT><DEDENT>
Create a directory *path* with subdirs but do not complain if it exists.

    This is like GNU ``mkdir -p path``.