Re: Extention Woes

2005-10-20 Thread Tuvas
Never mind, problem solved. The other problem I was having was I forgot to put the .so at the end of a file, so it didn't change anything. Thanks for all of the help! -- http://mail.python.org/mailman/listinfo/python-list

Re: Extention Woes

2005-10-20 Thread Fredrik Lundh
Tuvas wrote: Well, the point of declaring it as a char was to have it as an 8 bit integer, as is requested later on in the program. since ParseTuple writes an integer to the address you pass in, that's likely to overwrite some random stuff on the stack. like- wise, passing in a character

Extention Woes

2005-10-19 Thread Tuvas
I am in the process of writing an extention module, and am coming up with lots of problems. Perhaps someone could be of use. I keep getting data that isn't what I'm sending the program. Let me give the line of C code and Python Code and output to illistrate the problem.

Re: Extention Woes

2005-10-19 Thread Fredrik Lundh
Tuvas wrote: I am in the process of writing an extention module, and am coming up with lots of problems. Perhaps someone could be of use. I keep getting data that isn't what I'm sending the program. Let me give the line of C code and Python Code and output to illistrate the problem.

Re: Extention Woes

2005-10-19 Thread Dave Brueck
Tuvas wrote: I am in the process of writing an extention module, and am coming up with lots of problems. This isn't a direct answer to your question, but what sort of extension is it? Do you need to actually write a Python extension? I ask because I've all but stopped writing Python extension

Re: Extention Woes

2005-10-19 Thread Tuvas
I tried Ctypes, but it was giving me tons of problems in the install phase, and so I decided it'd just be better to use an extention module. It's the type of stuff that could be perfectly done with ctypes, but... Oh well. Also, I've done all but this last little piece with extentions, might as

Re: Extention Woes

2005-10-19 Thread Tuvas
Forgot, var declartions int can_han; int com; char len; char dat[8]; -- http://mail.python.org/mailman/listinfo/python-list

Re: Extention Woes

2005-10-19 Thread Neal Norwitz
Tuvas wrote: Forgot, var declartions int can_han; int com; char len; char dat[8]; That should probably be: int len; char *dat; IIRC, z returns the internal string pointer. # is definitely not going to return a char. I'm pretty sure it returns an

Re: Extention Woes

2005-10-19 Thread Tuvas
Well, the point of declaring it as a char was to have it as an 8 bit integer, as is requested later on in the program. Anyways, I tried making the changes, similar results. The len value was always right, the problem seems to be in this com value. BTW, it doesn't give me one single warning, so I