A modest Error (I mean Proposal)
Arinte
shouldbe at message.com
Thu Jan 20 08:10:04 EST 2000
I am getting this weird error???
Traceback (innermost last):
File "Beer", line 17, in ?
File "D:\POSSApps\anotherposs app\PossDevice.py", line 37, in IOCTL
if type(command)==type(2):
TypeError: len() of unsized object
Here is the code for the function it craps out on...
def IOCTL(self, command, dargs):
command1 = long(0)
if type(command)==type(2):
poss.write("IOCTL was int")
command1 = long(command)
poss.write("IOCTL Set to Long");
else:
if type(command) == type(" "):
poss.write("IOCTL was a string")
command1 = command
else:
if type(command)!=type(2L):
poss.write("IOCTL fail")
return -1
self.dump();
poss.IOCtl(self.devname,command1,dargs) #make this pass the ioctl command
as an PossArg with a special name
return 0
This is part of a middle class between my C++ program and the user written
python code.
More information about the Python-list
mailing list