Very useful message -- Hah!

Fredrik Lundh fredrik at pythonware.com
Sun Dec 5 16:02:38 EST 1999


> >    - start the interpreter with the -u option
> 
> OK I don't know how to arrange that, color me dumb.

in your sample script, change:

    #!/usr/bin/python

to:

    #!/usr/bin/python -u

> >    - or call sys.stdout.flush() at the appropriate
> >      places (you have to import the sys module
> >      first).
> 
> But that won't work for syntax error -- right?

it will work, if you've redirected sys.stderr to
sys.stdout (as you did in your sample).

</F>





More information about the Python-list mailing list