On Jul 18, 7:03 am, Tim Chase wrote:
> Lastly, you can force all standard-output in your program to be
> unbuffered without the "-u" parameter:
And if you're using -u a lot, the PYTHONUNBUFFERED environment
variable can also be set (but not empty), so that python adds the
option automatically.
--
I notice a difference between running the following script on my Mac and on
a PC:
from time import sleep
for i in range(10):
print i,
sleep(2)
On my PC this prints a number every 2 seconds. This is the behavior I want.
On my Mac Python waits 10*2 = 20 seconds, and then prints 0 1 2 3 4 5
Hello list
I notice a difference between running the following script on my Mac and on
a PC:
from time import sleep
for i in range(10):
print i,
sleep(2)
On my PC this prints a number every 2 seconds. This is the behavior I want.
On my Mac Python waits 10*2 = 20 seconds, and then prints 0