C Module question

Marc 'BlackJack' Rintsch bj_666 at gmx.net
Mon Nov 10 14:52:29 CET 2008


On Mon, 10 Nov 2008 05:36:58 -0800, boblatest at googlemail.com wrote:

> On Nov 10, 1:16 pm, Marc 'BlackJack' Rintsch <bj_... at gmx.net> wrote:
>> On Mon, 10 Nov 2008 03:11:06 -0800, boblat... at googlemail.com wrote:
>> > 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*.
>>
>> http://docs.python.org/c-api/file.html#PyFile_AsFile
> 
> Yes, got it. At first I thought I had to use the "Parse" functions for
> my args, but in fact I can of course just access the args as a tuple
> (and then do the type checking myself).
> 
>> Why passing it in and out?  Simply use the C module level to store the
>> information.
> 
> But if I create several instances of a class (in the wrapper module) my
> C methods won't know which object they were called on.

Well you talked about functions in the module not about methods on 
objects.

Ciao,
	Marc 'BlackJack' Rintsch



More information about the Python-list mailing list