[python-win32] script as .dll file

Tim Roberts timr at probo.com
Mon Oct 25 21:06:18 CEST 2004


On Fri, 22 Oct 2004 09:48:25 -0500, "Christian Junker" 
<christian at TreesforLife.org> wrote:

>Hi all,
> 
>don't know if it's the right place to ask here, but I just read the other thread about DLLs so I thought I could ask my question as well:
> 
>How do I compile a .py file into a .dll (PIC) file? And I am not talking about a COM-server or anything, just a simple Python script file.
>  
>

You can't, for the same reason you couldn't do it with Visual Basic.  
Python is interpreted, so there has to be an interpreter in there.  The 
right way to do it -- just like with Visual Basic -- is to make an 
out-of-process COM server.

Theoretically, I suppose you could write a C++ wrapper that fired up an 
interpreter and called classes in your script, but believe me when I say 
that would be more trouble that a simple COM server.

-- 
- Tim Roberts, timr at probo.com
  Providenza & Boekelheide, Inc.



More information about the Python-win32 mailing list