Pythonwin embedded in another program...

Mark Hammond MarkH at
Fri Jun 22 02:56:26 CEST 2001

Chris wrote:

>  After building elapsedTimer_d.pyd and sio_d.pyd I manually made
> reference to them in the registry where the other module references
> are.  Upon trying to import from the interactive prompt in our monitor
> I get the following error.

This wont work.  You need to run _everything_ as debug versions, and 
then there is no reason to modify the registry at all.

In general, you simply embed against "win32ui_d.pyd" instead of 
"win32ui.pyd".  This will magically bring in "pythonxx_d.dll" and force 
_all_ .pyd imports to locate an _d version.

If this is too intrusive, you could consider sticking with the "release" 
build, but modify the build process temporarily to disable optimizations 
and enable symbolic debug info.  This will then let you debug just those 
.pyd files, but not the ones you are not building manually.

Also, later versions of the win32 extensions have serial port support in 
the win32file module.  This may be a better long term approach than the 
serial module.


More information about the Python-list mailing list