exception in python15.dll, I need python15_d.dll, or a CBuilder .lib for python15_d.lib to resolve

Brad Clements bkc at murkworks.com
Sun May 9 18:30:55 EDT 1999


I'm trying to embed Zope in a CBuilder 4++ .DLL that is being loaded by a BC
5.02 application.

I'm trying to redirect sys.stdout.write to an internal C function.

I'm getting an exception in python15.dll when calling print after
redirection.

Exception Access violation at CFDA in module python15.dll write of address
013831BA.

One problem to solving this is that python15_d.dll doesn't exist in the
distribution, and the .lib is MSC only. I created a cbuilder compatible
import library using python15.dll and linking goes ok, PyRun_SimpleString
works, but the stdout redirection creates the exception shown above.

As a simple test, I tried this

import sys
class nowhere:
     def write(self,arg):
           pass

sys.stdout = nowhere()
print "test"


>From the command line python, this works ok. But from my DLL this dies.


Any ideas?








More information about the Python-list mailing list