[C++-sig] std streams!?

Ira sheig222 at gmail.com
Mon Jul 25 14:45:11 CEST 2005


Hi,

What I'm attempting to do is build some sort of demo that uses my company's
MFC/GDI based window/gui MMI and generate evrerything from script via
python.

I have a basic MFC dialog app that holds an instance for the MMI and a
python interpreter.

Now when I give the interpreter jobs to do it may result in an exception at
which point I wish to call PyErr_Print(). As I understand this is suppose to
go to the console but I don't *have* a console. I added a console with
win32's AllocateConsole() and although I can write errors in there
PyErr_Print() still doesn't do what I think it's suppose to.

Am I missing something?
does PyErr_Print() write to stderr?
How can I change the python output streams (If I can do that then I think my
problem is solved).

Thanks,
Ira







More information about the Cplusplus-sig mailing list