def createoutputdirs(outputs):
 for output in list(outputs.values()):
  dirname = os.path.dirname(output)
  if (not os.path.isdir(dirname)):
   os.makedirs(dirname)

def createoutputdirs ( outputs ) : for output in list ( outputs . values ( ) ) : dirname = os . path . dirname ( output ) if ( not os . path . isdir ( dirname ) ) : os . makedirs ( dirname )
create all output directories .