What OS are you doing this on? I had an issue similar to this and it was due to default buffering behavior of my tty's. If I recall correctly I executed a bunch of settty to eliminate the buffering behavior of stdout. The set the terminal back to it's original setting when my program was done.
Anand -- http://mail.python.org/mailman/listinfo/python-list