def remove(self): ''' Remove all wires associated with this pin before removing it from the pin items pool. Return its id. :return: id of deleted pin ''' for connection in netlist.direct_connections_to(self): Wire.remove(Wire.segments[connection]) Item.remove(self) if self.bubble: self.bubble.remove() self.canvas.delete(self.group) return self.id
def has_wires_connected(self): return len(netlist.direct_connections_to(self)) > 0