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

David L Goldsmith David.L.Goldsmith at noaa.gov
Wed Jun 13 02:23:53 UTC 2007


Greg Ewing wrote:
> 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".
But which Python module namespace does my C class belong to?  How do I 
make my C class part of a Python module namespace?

DG
>
> -- 
> Greg

-- 
ERD/ORR/NOS/NOAA <http://response.restoration.noaa.gov/emergencyresponse/>



More information about the Pyrex mailing list