Skip to content

Latest commit

 

History

History
37 lines (25 loc) · 1.28 KB

fileshim.rst

File metadata and controls

37 lines (25 loc) · 1.28 KB

c

double: Porting; PyFile

The PyFile API

In Python 3, the PyFile API was reduced to a few functions, and is now meant for internal interpreter use.

Python files (and file-like objects) should be manipulated with the API defined by the :pypy3:io module.

But, in the real world, some C libraries only provide debugging output to FILE*. For cases like this, py3c provides a quick-and-dirty replacement for :cpy2:PyFile_AsFile: