def normalize_paths(value, parent=os.curdir):
 if ((not value) or isinstance(value, list)):
  return value
 paths = []
 for path in value.split(','):
  if ('/' in path):
   path = os.path.abspath(os.path.join(parent, path))
  paths.append(path.rstrip('/'))
 return paths

def normalize_paths ( value , parent = os . curdir ) : if ( ( not value ) or isinstance ( value , list ) ) : return value paths = [ ] for path in value . split ( ',' ) : if ( '/' in path ) : path = os . path . abspath ( os . path . join ( parent , path ) ) paths . append ( path . rstrip ( '/' ) ) return paths
parse a comma-separated list of paths .