running python as dll

Alex Martelli aleaxit at yahoo.com
Mon May 7 15:40:39 EDT 2001


"Brian" <brian at rk-speed.dk> wrote in message
news:3AF6A1E9.74976B3C at rk-speed.dk...
> Hi group,
>
> is it simple to run a python script as a dll called from anothor
> application?

It's pretty easy to run the Python _interpreter_ as a DLL called
from another application, on the only platform I know where
shared libraries are called DLL's, i.e., Windows.  See the
"Embedding and Extending" manual that comes with the
standard Python distribution for how your application can
control and direct the Python interpreter.  Alternatively, if
you don't need to be cross-platform and are using languages
which don't support the Python C API (e.g., Visual Basic),
on Windows you can "run a Python script as a DLL called
from another application" using Microsoft's ScriptControl
(easy to use from any language that supports COM well) and
the ability of Python (with the win32all extensions) to support
Microsoft's ActiveScripting standards.


Alex






More information about the Python-list mailing list