Embedding Python In a WINDOWS App - Help!!!!

Giles Brown giles_brown at hotmail.com
Mon Jul 19 06:01:57 EDT 2004


"Tim Stanka" <timstanka at bluefrog.biz> wrote in message news:<cdejol0np6 at enews1.newsguy.com>...
> I'm brand new to Python and WINDOWS programming. I was given the task of
> integrating a scripting language into our WINDOWS MFC application.
...
> Unfortunately I have a situation where extensions in DLLs need to call
> functions which are native to the WINDOWS application. 
> I tried to talk my coworker into
> moving this functionality into DLL's or static libraries which my extension
> DLLs
> could link against but he was not superly receptive because we are
> leveraging
> a very complex existing design as our new application.

Just to clarify, you've have some existing functions that are built
into
your .exe file, but you want the C functions in the extension .dll
files
to be able to call the same functions *as C functions* that are in the
.exe file.

Here are some options:
1) Share the functions as source code.
2) Persuade your co-workers to put the functions into a .lib file and
share
using as a static library.
3) Provide Python wrapping functions for the functions in the .exe so
that
they available as built-in functions to from your applications Python
interpreter instance.  Then your extension .dll files will call then
functions using *Python* function call mechanics.

Hope these suggestions are useful to you,
Giles Brown



More information about the Python-list mailing list