Embedding: Defining packages?

Bjoern Giesler un4e at rz.uni-karlsruhe.de
Sat Jul 17 12:09:09 EDT 1999


Hi,

I'm embedding Python in a rather complex C program. To represent the
complexity (and to keep the thing modular), I want to define several 
Python modules and group them in a package hierarchy:

         MyProgram
         +- Server
         |       +- Communications
         |       +- HardwareAccess
         +- Client
                 +- Communications
                 +- AbstractObjects

...etc. How do I do that? Is there a way to pass hierarchical module names
to Py_InitModule, such as

theModule = Py_InitModule(methodDefs, "MyProgram.Server.Communications");

My attempts so far haven't worked.

Thanks in advance,
         --Bjoern

PS I'm posting this via the newsgroup, as sending mail to python-list at cwi.nl
   doesn't seem to work. Has anything changed there that I'm not aware of?
-- 
--------------------------------/\--One OS to rule them all---Windows NT-----
Bjoern Giesler                 /  \  One OS to find them           
<un4e at rz.uni-karlsruhe.de>    / <> \  One OS to bring them all    
-----------------------------/______\--And in the Darkness bind them---------
    Thank you for your time, worship the Antichrist, and have a nice day.




More information about the Python-list mailing list