Python DLL in Windows Folder

Markus Gritsch m.gritsch at gmail.com
Tue Dec 25 04:43:01 EST 2007


On 24/12/2007, Lie <Lie.1296 at gmail.com> wrote:
>
> (good programs are not DLL implementation specific

Assume an application embedding Python being compiled with MSVC 8.0.
It uses the runtime msvcr80.dll.  If you now pass objects created in
your application to the Python interpreter which is compiled with MSVC
7.1 which uses msvcr71.dll, you are asking for serious trouble.  It is
not a matter of being a "good program".

> If that's the case, just use the MSVC 7.1's compiled code, there won't
> be much difference.

See above.

> If you insist to use your own version (or don't
> have a choice), you could instead pack your own DLL, use the local
> DLL, and ignore the system's DLL.

Yes, that works fine when deploying the application.  However, during
development it is inconveninent to put our own Python DLL beside our
executable every time.  Our Python DLL (compiled with MSVC 8.0) is in
the PATH.  If the original Python DLL would be located in the Python
installation folder, there would be no problem.  But since it is
placed in the system32 folder which is searched before the PATH
(http://msdn2.microsoft.com/en-us/library/ms682586(VS.85).aspx), the
original Python DLL (compiled with MSVC 7.1) is used instead of your
own one.

Kind regards,
Markus



More information about the Python-list mailing list