Re: Question about typing: ints/floats

2010-03-03 Thread Zeeshan Quireshi
On Mar 3, 6:45 pm, Wells wrote: > This seems sort of odd to me: > > >>> a = 1 > >>> a += 1.202 > >>> a > > 2.202 > > Indicates that 'a' was an int that was implicitly casted to a float. > But: > > >>> a = 1 > >>> b = 3 > >>> a / b > > 0 > > This does not implicitly do the casting, it treats 'a' an

Passing FILE * types using ctypes

2010-03-03 Thread Zeeshan Quireshi
Hello, I'm using ctypes to wrap a library i wrote. I am trying to pass it a FILE *pointer, how do i open a file in Python and convert it to a FILE *pointer. Or do i have to call the C library using ctypes first, get the pointer and then pass it to my function. Also, is there any automated way to c