Hello,

I'm trying to write a Python extension module in C for the first time.
I have two questions:

1. How can I pass a file-like object into the C part? The PyArg_*
functions can convert objects to all sort of types, but not FILE*.

2. How can I preserve information needed in the C part between calls
to my module functions? The way I've thought of is:
- put this information in a dynamically allocated struct
- pass it out of and into the C module as CObject into/from an
intermediate Python wrapper module where it gets stored in a Python
object

Is this the way to do it?

Thanks.
robert
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to