#NEWLINE# def mkdir_p( path ) : #NEWLINE# #INDENT# 'Make directory and all subdirectories if they do not exist' #NEWLINE# try : #NEWLINE# #INDENT# os . makedirs ( os . path . abspath ( path ) ) #NEWLINE# #UNINDENT# except OSError as exc : #NEWLINE# #INDENT# if ( ( exc . errno == errno . EEXIST ) and os . path . isdir ( path ) ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise