parameters: (path)
docstring: Ensures the directory parent to the given file exists.
docstring_summary: Ensures the directory parent to the given file exists.
docstring_tokens: Ensures the directory parent to the given file exists .
function: def ensureParentDir(path):
      """Ensures the directory parent to the given file exists."""
      d = os.path.dirname(path)
      if d and not os.path.exists(path):
          try:
              os.makedirs(d)
          except OSError, error:
              if error.errno != errno.EEXIST:
                  raise
function_tokens: def ensureParentDir ( path ) : d = os . path . dirname ( path ) if d and not os . path . exists ( path ) : try : os . makedirs ( d ) except OSError , error : if error . errno != errno . EEXIST : raise