Mailing List Archive

1 2  View All
Re: Re: A warning switch? [ In reply to ]
> Can we then please have an interface to the "give warning" call (in
> stead of a simple fprintf)? On the mac (and possibly also in
> PythonWin) it's probably better to pop up a dialog (possibly with a
> "don't show again" button) than do a printf which may get lost.

Sure. All you have to do is code it (or get someone else to code it).

<0.9 wink>

--Guido van Rossum (home page: http://www.python.org/~guido/)
RE: Re: A warning switch? [ In reply to ]
> > Can we then please have an interface to the "give warning" call (in
> > stead of a simple fprintf)? On the mac (and possibly also in
> > PythonWin) it's probably better to pop up a dialog (possibly with a
> > "don't show again" button) than do a printf which may get lost.
>
> Sure. All you have to do is code it (or get someone else to code it).

How about just having either a "sys.warning" function, or maybe even a
sys.stdwarn stream? Then a simple C API to call this, and we are done :-)
sys.stdwarn sounds OK - it just defaults to sys.stdout, so the Mac and
Pythonwin etc should "just work" by sending the output wherever sys.stdout
goes today...

Mark.

1 2  View All