Investigate
See shim in https://github.com/encukou/py3c/blob/master/include/py3c/fileshim.h which is roughly an equivalent to our PyFile_AsFile
in SWIG/_py3k_compat.i.
Is there something we may/should use? (Flushing the file?)
Edited by Matěj Cepl