Embedded apps and range???

Arinté jamarijr at hotmail.com
Wed Jul 5 15:42:28 EDT 2000


I am trying to use a range in a for loop
	for i in range(-1,sz):
		devlist[0] = PossDevice.PossArg(resource,i)
		devlist[0].setValue(i)
		ret = diz.set(devlist)
		diz.ioctl("POS_SYS_GET_VALUES",devlist)
		if i not in _range:
			print "Checking for errors " + str(ret)
			checkForErr(ret,error)

I am getting the good old "TypeError: len() of unsized object" error,
problem is when I use range(sz) or range(1,sz) I don't get the error???




Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list