"George Wahid" <geoter...@gmail.com> wrote

Thanks for the answers. I didn't have this problem with python 2.5. I
know I can use stdout instead, but I want to know what I'm doing
wrong.

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/

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to