Python stdout, \r progress bar and sshd with Putty not updating regularly
Posted
by Kyle MacFarlane
on Stack Overflow
See other posts from Stack Overflow
or by Kyle MacFarlane
Published on 2010-04-26T08:57:44Z
Indexed on
2010/04/26
23:13 UTC
Read the original article
Hit count: 196
I have a dead simple progress "bar" using something like the following:
import sys
from time import sleep
current = 0
limit = 50
while current <= limit:
sys.stdout.write('\rSynced %s/%s orders' % (current, limit))
current_order += 1
sleep(1)
Works fine, except over ssh with Putty. Putty only updates every 3 minutes or if a line ends with \n. Is this a Putty setting, sshd_config, or can I code around it?
© Stack Overflow or respective owner