Maybe of interest to people loking for a solution: I solved my issue by changing the program retroactively from a pure MFC app to a console one using this procedure: http://homepage3.nifty.com/ysflight/mfcconsole/mfcconsole.html
I am still not sure why all of my other attempts failed, but most somehow changed stderr after the program started and before the python initialisation call. Maybe by binding in the python libraries some initialisation is done automatically before the first "user" C++ line is called and so any change done by the C++ code ignored? Oh well, it works now, even if with a kludge (I always need to have a console, even if I do not use Python). Bye bye, Wolfram Kuss. -- http://mail.python.org/mailman/listinfo/python-list