Embedding: Defining packages?

Bjoern Giesler un4e at rz.uni-karlsruhe.de
Tue Jul 20 03:56:23 EDT 1999


Hi,

Michael P. Reilly <arcege at shore.net> wrote:
: Bjoern Giesler <un4e at rz.uni-karlsruhe.de> wrote:
: : theModule = Py_InitModule(methodDefs, "MyProgram.Server.Communications");

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

...was of course what I meant. Mine was just a typo. Still, this gives me a
module named "MyProgram.Server.Communications", but _no_ module "MyProgram".
What I want is to be able to say
	from MyProgram import *
and then address functions via
	Server.Communications.foo()

This doesn't work; it seems that Python can't define _packages_ from C, but
only _modules_. Is that correct?

		--Bjoern
-- 
--------------------------------/\--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