def _escape_filename(filename):
 if (' ' not in filename):
  return filename
 if (filename.startswith('"') and filename.endswith('"')):
  return filename
 else:
  return ('"%s"' % filename)

def _escape_filename ( filename ) : if ( ' ' not in filename ) : return filename if ( filename . startswith ( '"' ) and filename . endswith ( '"' ) ) : return filename else : return ( '"%s"' % filename )
escape filenames with spaces by adding quotes .