[capi-sig] Problem with a sub-module

Gustavo Carneiro gjcarneiro at gmail.com
Sat Dec 29 18:59:45 CET 2007

On 29/12/2007, Remi K. <remi.k2620 at gmail.com> wrote:
> Hi everybody,
> I have two modules:
>     m1 = Py_InitModule3("PySFML", NULL, "Python binding for sfml (Simple
> Fast Media Library)");
>     m2 = Py_InitModule("sf", module_methods);

Try this:

        m2 = Py_InitModule("PySFML.sf", module_methods);

Then I add a few classes, like Color, to m2.
> Then I make the first module contain the second one:

    PyModule_AddObject(m1, "sf", m2);

That is not needed.

Gustavo J. A. M. Carneiro
INESC Porto, Telecommunications and Multimedia Unit
"The universe is always one step beyond logic." -- Frank Herbert

More information about the capi-sig mailing list