#NEWLINE# def make_dirs( * lpath ) : #NEWLINE# #INDENT# 'Ensure the directories exist.\n\n    lpath: path fragments\n    ' #NEWLINE# path = os . path . join ( * lpath ) #NEWLINE# try : #NEWLINE# #INDENT# os . makedirs ( os . path . dirname ( lpath ) ) #NEWLINE# #UNINDENT# except OSError as e : #NEWLINE# #INDENT# if ( e . errno != errno . EEXIST ) : #NEWLINE# #INDENT# raise #NEWLINE# #UNINDENT# #UNINDENT# return os . path . abspath ( path )