It will be nice to have clear name space in Python. PAD_SMD is not same type as PAD_RECT, please add PAD_KIND_ and PAD_SHAPE_ prefix. was:Python scripting Pad. Type (KICAD_T *) has not any method to determine pad type (lp:#1393106)
Original report created by LordBlick (lordblick)
>>> brd = pcbnew
>>> pcb = brd.GetBoard()
>>> mods = list(pcb.GetModules())
>>> fp = mods[0]
>>> pads=fp.Pads()
>>> pad=pads[0]
>>> pdt = pad.Type()
>>> pdt
<Swig Object of type 'KICAD_T *' at 0x7f011287ca50>
>>> for strAttr in dir(pdt):
... _attr = getattr(pdt, strAttr)
... if callable(_attr):
... print("pdt.%s()" % strAttr)
...
pdt.__class__()
pdt.__cmp__()
pdt.__delattr__()
pdt.__eq__()
pdt.__format__()
pdt.__ge__()
pdt.__getattribute__()
pdt.__gt__()
pdt.__hash__()
pdt.__hex__()
pdt.__init__()
pdt.__int__()
pdt.__le__()
pdt.__long__()
pdt.__lt__()
pdt.__ne__()
pdt.__new__()
pdt.__oct__()
pdt.__reduce__()
pdt.__reduce_ex__()
pdt.__repr__()
pdt.__setattr__()
pdt.__sizeof__()
pdt.__str__()
pdt.__subclasshook__()
pdt.acquire()
pdt.append()
pdt.disown()
pdt.next()
pdt.own()
>>>
Original tags: python