def create_directory(dirname):
 try:
  os.makedirs(dirname)
 except OSError:
  pass

def create_directory ( dirname ) : try : os . makedirs ( dirname ) except OSError : pass
creates dirname and its parents if it does not exist .