How to make a *.pyd or a DLL of several modules?

Gordon McMillan gmcm at hypernet.com
Wed Mar 15 09:51:39 EST 2000


Harald Angelow writes:

> I have several Python modules and want to put them into a PYD or into a DLL.
> Freezing only supports executeables, so how can i make one DLL of these
> modules?

You want to freeze them? I'm sure you can do it with the 
frozen code in a dll, but frozen modules need to be listed in a 
table in the executable, so having the code in a dll won't help 
you any.

Maybe you want something like:
http://starship.python.net/crew/gmcm/archives.html

> Importing that DLL should be the same like importing all Modules.

I suppose you could play games with "from x import *", but I 
believe you'd regret it. If they are all user-accessible, then 
each should be imported explicitly by the user, or one should 
play the role of gateway to the others.

- Gordon




More information about the Python-list mailing list