[Pyrex] [Mac Inter Core Duo OS 10.4.9 ] extern C class decl. requires module specification

Greg Ewing greg.ewing at canterbury.ac.nz
Wed Jun 13 01:03:56 UTC 2007


David Goldsmith wrote:

> *Pyrex 0.8 and later requires you to include a module name in an extern 
> extension class declaration, for example, 
> cdef extern class MyModule.Spam*
> 
> with no indication of where "MyModule" comes from; is it the root part 
> of the name of the header file in which class Spam is declared?

No, it's the name of the module in Python's module
namespace -- the name you would use if you wanted to
import the class in Python, e.g. "from MyModule
import Spam".

--
Greg



More information about the Pyrex mailing list