57 ptr = string.index(
'=')
59 raise MalformedAttributeError
60 if ptr == 0
or ptr == len(string) - 1:
61 raise MalformedAttributeError
62 if string[ptr - 1] ==
' ' or string[ptr + 1] ==
' ':
63 raise MalformedAttributeError
65 return string[:ptr], string[ptr + 1:]
78 except MalformedAttributeError:
97 return [ob
for ob
in rev.toplevel_objects()
if is_attribute(ob)]
104 return [attrib
for attrib
in ob.attached_objects()
if is_attribute(attrib)]
135 for attrib
in attribs:
141 except MalformedAttributeError:
143 if attrib_name == name:
144 found += [attrib_value]
153 return search(rev.toplevel_objects(), name)
163 return search(ob.attached_objects(), name)
Schematic net segment, bus segment, or pin.
def search_floating
Search the floating attributes in a revision for an attribute name and return matching values...
def find_attached_attribs
Return the attributes directly attached to a net or component.
High-level revision proxy class.
def search_all
Search both attached and inherited attributes of a component for an attribute name and return matchin...
def search
Search a list of objects for attributes with a certain name and return their values.
def find_inherited_attribs
Return the attributes inherited by a component via its symbol.
def find_all_attribs
Return all attributes, attached and inherited, of the specified component.
def search_inherited
Search attributes inherited by a component for an attribute name and return matching values...
def inherited_objects
Returns the toplevel objects of a component's symbol.
def is_attribute
Tell whether an object is a text object whose text constitutes a valid attribute. ...
def search_attached
Search attributes attached to a net or component for an attribute name and return matching values...
Schematic text or attribute.
High-level proxy classes for the storage backend.
def find_pins_by_attribute
Return all pins in a component with a particular attribute.
def find_floating_attribs
Return all floating attributes in the given revision.
def parse_string
Parse an attribute string of the form name=value into its name and value parts.