Python to .dll ?

Gordon McMillan gmcm at hypernet.com
Fri Nov 30 09:32:06 EST 2001


Dennis Conrad wrote:

> Is there a possibility to create a (win32) .dll from a Python-script? I
> know there is py2exe, maybe there is something like py2dll...?

Installer release 5 can do this. It comes with a dll that allows you to 
"freeze" an in-process com server. But that dll probably won't do you much 
good - the C code in the dll is focussed on fooling COM & pythoncom. 

You should be able to write a dll exposing whatever entry points you need. 
The code you need to set things up (load Python, set the import hooks, run 
scripts etc.) has all been factored out into source/common/launch.c (by Alan 
Green, who was doing exactly this).

-- Gordon
http://www.mcmillan-inc.com/
 




More information about the Python-list mailing list