Question

I'm tyring to compile Yenc for Python 3.2. I noticed that gcc complained about a non-declared function PyString_Type, so I replaced it with its replacement PyBytes_Type as according to the documentation.

However, gcc also complained about an undeclared function called PyFile_Type. I googled a bit and found:

Python 3.x replaces the PyFile_Type extension type 
with an abstract interface and specific implementation types. 
Unfortunately it doesn't make any of this directly available 
with a C level api.

source

I am by no means a C-programmer, which leaves me unable to solve this issue. What should I do to solve this?

Edit: output of compilation, _yenc.c

Thanks!

Was it helpful?

Solution

Simply put, PyFile_Type has been replaced by something not even remotely similar in Python 3, and you'll have to either modify the code yourself or wait for the maintainer to do that. If you're not a C programmer, it'll likely have to be the latter. The documentation states that rather than wrapping FILE*'s, Python 3 now wraps low-level I/O, in this case file descriptors and read()/write().

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top