Is it possible to write a DLL using python
Robin Becker
robin at SPAMREMOVEjessikat.fsnet.co.uk
Wed Aug 18 03:51:31 EDT 2004
Paul Miller wrote:
> AMD <amdescombes at qualicontrol.com> wrote in message news:<cft24m$njb$1 at news-reader2.wanadoo.fr>...
>
>
>>I need to write a Win32 DLL and I would like to use Python instead of
>>VB, C++ or Delphi. Is this possible?
>
>
> No. It is possible to interface to and from Python via other
> languages, but since Python does not create native code, you cannot
> create a DLL with it.
This is not strictly true. At work I have made DLLs which encapsulate
the base python code and then link themselves to a specialized version
of Python (to avoid clashes with any other python). At the extreme we
made a Darwin shared library which encapsulated our application code and
the whole of python. I made use(misuse probably) of the freeze tool to
accomplish this latter. The result was a single binary .so with a simple
interface that used python internally.
Python doesn't make this easy (the startup is fairly complex), but it is
possible.
--
Robin Becker
More information about the Python-list
mailing list