Home › Forums › Nazca › Questions and Answers › define pins in a loop › Reply To: define pins in a loop
21 February 2019 at 11:24
#5451
Chenhui
Member
Hello Ronald,
Thanks for your quick reply. This is a very useful function.
Firstly, in my case, I should use
padN1.raise_pins(['out0'],['out'+str(1)])
Secondly, I want to make it even easier, for example, using a loop to define all of the PIN together. This should be a basic function in Python. please check below wrong code.
for i in range (2):
'padN'+str(i).raise_pins(['out0'],['out'+str(i)])
#AttributeError: 'str' object has no attribute 'raise_pins'
Chenhui