[wxPython-users] Re: wPython in Action: example chapter 1

Robin Dunn robin at alldunn.com
Mon Apr 23 13:09:41 PDT 2007


Kevin Horton wrote:
> On 23 Apr 2007, at 13:06, Christopher Barker wrote:
> 
>> Robin Dunn wrote:
>>>     :param redirect: Should ``sys.stdout`` and ``sys.stderr`` be
>>>         redirected?  Defaults to True on Windows and Mac, False
>>>         otherwise.
>>
>> Just a note: is it possible at this point to change the default? I 
>> think we'd get a lot fewer confused newbies if the default was NOT to 
>> re-direct.

I'll consider it for 2.9.  I think 2.8 should not change this since it 
is a stable version.

> 
> I agree 100%.  I wasted many hours trying to troubleshoot errors without 
> being able to see the Python traceback, as I had not yet learned that I 
> needed to set redirect to False.  I made much quicker progress once I 
> could see where my errors were coming from.  As I understand it, the 
> arguement to have the Windows and Mac default to True, is the belief 
> that in most cases a console window will not be open.  This may be true 
> when an app is being used by the end user.  But it certainly isn't true 
> when a newbie is working on his first few apps.
> 
> If an app is being used by an end user, and a console window is not 
> open, what is the harm to have redirect set to False?

I'm not sure if it is still the case, but at one point in time on 
windows if you output a lot of stuff to the real stdout and there was no 
console window to write it to, then eventually the buffer would fill up 
and the program would be suspended until the buffer was emptied.  If 
somebody wanted to try and reproduce this on win2k, XP and Vista to see 
if it is still an issue I would appreciate it.

-- 
Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!





More information about the wxpython-users mailing list