Access violation while trying to replace stdout with a local disk file

Gordon McMillan gmcm at hypernet.com
Mon Nov 29 18:55:35 CET 1999


SINICA writes:
> 
> I'm trying to redirect the output of Python into a external
> diskfile since my program and python interpretor are two
> different processes (python15.dll and myprog.exe)
> PyObject_Print() will cause a "Access Violation" while trying to
> print on the file handle which is created by myprog.exe
> 
> any suggestion will be greatly appreciated.

They both need to be linked to the same c-runtime library, (ie, 
"Multithreaded DLL" in Settings | Compile | Code Generation).

- Gordon




More information about the Python-list mailing list