Using python23 to develop an extension for an application that has python22 embedded
Mike at DeleteThis.Geary.com
Tue Apr 6 17:40:57 CEST 2004
> Michael Geary wrote:
> > 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.
John Underwood wrote:
> May be it comes down to the approach taken to debug an extension.
> (I'm new to Python - as you've probably guessed - and debugging
> mixed language situations.)
> To use the dubugging features of Visual Studio to debug my extension
> code, I thought I needed to use python22_d.dll (the debug version fo
> python22.dll). Is this correct? If so, I have not been able to produce
> it with Visual Studio .NET because of the problems VS has with 2.2.
> On the other hand, would it be better to debug the extension without
> the Python interface (in other words, debug the internals of the
> extension that are not dependent on Python) before attempting to test
> the Python interface (which could be performed with python22.dll)?
Oh! I think I just realized what I was missing. Is your Poser extension part
Python and part C/C++? I was assuming it was pure Python.
If it was pure Python, then of course it wouldn't matter if you had the
debug version of python22.dll. You'd use the debugging facilities that the
Python interpreter provides for Python code, which don't depend on having
the debug version of the interpreter.
If you were debugging code in the Python interpreter itself, then you would
certainly need the debug version of python22.dll.
But are you are developing both some Python code and an extension DLL
written in C/C++? In that case, it still wouldn't be necessary to have the
debug version of python22.dll, any more than you need a debug version of the
Windows DLLs such as kernel32.dll and user32.dll. You would just build a
debug version of *your* DLL. Set the Debugging options in your VS.NET
project properties to run Poser, and you'll be good to go. You can set
breakpoints in your DLL, trace through the code, etc. The only limitation
will be that you can't trace through the code inside python22.dll. Only if
you need to do that would you need a debug version of that DLL.
More information about the Python-list