Sébastien Boisgérault a écrit : > The sys.stdout stream behaves strangely in my > Python2.4 shell: > > >>> import sys > >>> sys.stdout.write("AAAA") > >>> sys.stdout.write("BBBB\n") > BBBB > >>> sys.stdout.write("CCCC\nDDDD") > CCCC > >>> sys.stdout.flush() > [...nothing...]
There are two things competing on your stdout: what you explicitely ask the program to write and the prompt and echo of the interpreter. Try this: import sys, time sys.stdout.write('aaa'); sys.stdout.flush(); time.sleep(2) -- http://mail.python.org/mailman/listinfo/python-list