Using python23 to develop an extension for an application that has python22 embedded

Michael Geary Mike at DeleteThis.Geary.com
Mon Apr 5 20:44:55 EDT 2004


John Underwood wrote:
> I have both 2.2 and 2.3 installed on my computer. My problem has to do
> with Visual Studio .NET which will build 2.3 but will not build 2.2.
> (MS removed largeint.h which is required by pythoncore in 2.2 when
> they went from Visual C++ 6 to VS.NET. I tried supplying largeint.h to
> VS.NET but that did not work.)
>
> Since I cannot build 2.2, I do not have python22.dll or python22_d.dll
> (the debug version). (They are not shipped with python you have to
> produce them yourself.)

The executable Python installer for Windows does install pythonXX.dll. You
should find python22.dll and python23.dll in your Windows system32
directory.

Do you need python22_d.dll at all? I would think you'd need it only if you
were actually debugging the Python interpreter itself. I've never needed a
debug version of the Python DLL to debug ordinary Python code.

> The commercial application to which I need to add an extension has
> python22.dll in its runtime folder. I have no control over this
> application and have to use whichever version they have chosen.

Paint Shop Pro?

> Since I do have python23.dll and python23_d.dll (from a successful
> build of 2.3), can I use these to develop an extension for the
> aforementioned commercial application if I stay away from any new
> features in 2.3 (but not in 2.2)?

Are you talking about source code compatibility only? Sure, as long as you
use only language features available in both the old and new versions. You
can't use .pyc bytecode files from one version with a different version.

Anyway, I must be missing something here, because I would think you could
simply develop with your installed Python 2.2 and run the code under your
target application. You shouldn't have to be worrying about any of the stuff
you're dealing with.

-Mike





More information about the Python-list mailing list