示例#1
0
 def list_paths(self, with_attrs=True):
     json_paths = self.serialize_json()
     if (with_attrs):
         return ([
             "%6s | %s" % (get_class(json_paths[x]["class"]), x)
             for x in json_paths.keys()
         ])
     else:
         return ([x for x in json_paths.keys()])
示例#2
0
def get_yaml_paths(file, include_type=True):  # XXX: ordering is lost
    yaml_paths = parse_yaml(file)
    if (include_type is True):
        return ([
            "%s | %s" % (get_class(yaml_paths[x]['class']), x)
            for x in yaml_paths.keys()
        ])
    else:
        return (yaml_paths.keys())
示例#3
0
def get_yaml_paths(file, include_type=True):  # XXX: ordering is lost
    yaml_paths = parse_yaml(file)
    if(include_type is True):
        return(["%s | %s" % (get_class(yaml_paths[x]['class']), x) for x in yaml_paths.keys()])
    else:
        return(yaml_paths.keys())
示例#4
0
 def list_paths(self, with_attrs=True):
     json_paths = self.serialize_json()
     if(with_attrs):
         return(["%6s | %s" % (get_class(json_paths[x]["class"]), x) for x in json_paths.keys()])
     else:
         return([x for x in json_paths.keys()])