anything like a "pointer" in python?

Jp Calderone exarkun at intarweb.us
Wed Jul 2 23:34:04 EDT 2003


On Thu, Jul 03, 2003 at 09:41:05AM +0800, stevenswan wrote:
> I want to open a file in python and read something and process the file in c++ moduel, but there is no "pointer" in python,
> so how can I pass the arg(file buffer) between python and c++ modules?

  fileObj.fileno()

  Or, you could just open the file in your extension module.

  Or, you could pass the PyFileObject* (fileObj) to the extension module and
call PyFile_AsFile() on it.

  Jp





More information about the Python-list mailing list