[Tutor] new print statement + time module
George Wahid
geoterium at gmail.com
Sat Feb 28 20:11:54 CET 2009
> You aren't doing anything wrong. The print function writes to
> sys.stdout.
> sys.stdout is a buffered file which means it doesn''t write to its
> output
> immediately but waits until enough data is in its buffer to make it
> worthwhile - or until explicitly told to flush itself.
>
> Because you are trying to write only one character at a time it's not
> enough to make stdout write so you need to explicitly flush() it.
>
> --
> Alan G
> Author of the Learn to Program web site
> http://www.alan-g.me.uk/l2p/
Thanks for the explanation.
More information about the Tutor
mailing list