The amazing disappearing stderr

2012-05-02 Thread Peter Faulks
G'day All, Following on from my earlier query on overloading print() I've come up with this: /* < stdcallbk.pyd > */ /*---stdcallbk.h-*/ #ifndef STDCALLBK_MODULE_H #include #define STDCALLBK_MODULE_H // Type definition for the callback function. typedef

Re: (3.2) Overload print() using the C API?

2012-04-27 Thread Peter Faulks
On 27/04/2012 6:55 PM, Stefan Behnel wrote: Peter Faulks, 27.04.2012 10:36: On 27/04/2012 5:15 PM, Stefan Behnel wrote: Peter Faulks, 26.04.2012 19:57: I want to extend an embedded interpreter so that calls to print() are automagically sent to a C++ gui (windows exe) via a callback function

Re: (3.2) Overload print() using the C API?

2012-04-27 Thread Peter Faulks
On 27/04/2012 5:15 PM, Stefan Behnel wrote: Peter Faulks, 26.04.2012 19:57: I want to extend an embedded interpreter so that calls to print() are automagically sent to a C++ gui (windows exe) via a callback function in the DLL. Then I'll be able to do this: test.py i

Re: (3.2) Overload print() using the C API?

2012-04-26 Thread Peter Faulks
Cheers, Yes was aware this would (might) be possible in 3.x only. "All you have to do is assign to print". Sounds great! Can some kind soul hit me with a clue stick? Were do I look in the API? On 27/04/2012 4:26 AM, Chris Angelico wrote: On Fri, Apr 27, 2012 at 3:57 AM, Pe

(3.2) Overload print() using the C API?

2012-04-26 Thread Peter Faulks
G'day, I want to extend an embedded interpreter so that calls to print() are automagically sent to a C++ gui (windows exe) via a callback function in the DLL. Then I'll be able to do this: test.py import printoverload printoverload.set_stdout() printoverload.set_stderr() print("th