[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using a logging.Logger in a C extension

I am working my way through writing a C extension, and I've realized
that I need to log a few messages from the C code.

Ideally, I would pass my existing Logging.logger object into my C
function and use PyObject_CallMethod to call the appropriate method on
it (info, debug, etc.).

PyArg_ParseTuple should be able to handle this with an "O!" format unit,
but I can't figure out how to retrieve the type object for

Any hints, links, etc. appreciated.


Ian Pilcher                                         arequipeno at
-------- "I grew up before Mark Zuckerberg invented friendship" --------