Re: [Tutor] Sleeping it out

2007-12-08 Thread Ricardo Aráoz
Alan Gauld wrote: > "Eric Brunson" <[EMAIL PROTECTED]> wrote > >> Yes, import sys, then sys.stdout.flush() when you need it. > > This was my initial idea but it doesn't work in the IDE because > it is not really using sys.stdout. In fact the normal print works > fine from the command prompt (at l

Re: [Tutor] Sleeping it out

2007-12-08 Thread Eric Brunson
Alan Gauld wrote: > "Eric Brunson" <[EMAIL PROTECTED]> wrote > > >> Yes, import sys, then sys.stdout.flush() when you need it. >> > > This was my initial idea but it doesn't work in the IDE because > it is not really using sys.stdout. In fact the normal print works > fine from the command p

Re: [Tutor] Sleeping it out

2007-12-08 Thread Alan Gauld
"Eric Brunson" <[EMAIL PROTECTED]> wrote > Yes, import sys, then sys.stdout.flush() when you need it. This was my initial idea but it doesn't work in the IDE because it is not really using sys.stdout. In fact the normal print works fine from the command prompt (at least in XP) Alan G. Ricard

Re: [Tutor] Sleeping it out

2007-12-08 Thread Alan Gauld
"Ricardo Aráoz" <[EMAIL PROTECTED]> wrote > import time > L = [i for i in xrange(20)] > for n, i in enumerate(L) : >if n%3 == 0 and n > 0 : >print 'waiting 3 seconds' >time.sleep(3) >print i > > I'm using Py 2.51 and PyAlaMode. It works ok but instead of printing > in > gr

Re: [Tutor] Sleeping it out

2007-12-08 Thread Eric Brunson
Yes, import sys, then sys.stdout.flush() when you need it. Ricardo Aráoz wrote: > Hi, I have this code : > > import time > L = [i for i in xrange(20)] > for n, i in enumerate(L) : > if n%3 == 0 and n > 0 : > print 'waiting 3 seconds' > time.sleep(3) > print i > > I'm usin

[Tutor] Sleeping it out

2007-12-08 Thread Ricardo Aráoz
Hi, I have this code : import time L = [i for i in xrange(20)] for n, i in enumerate(L) : if n%3 == 0 and n > 0 : print 'waiting 3 seconds' time.sleep(3) print i I'm using Py 2.51 and PyAlaMode. It works ok but instead of printing in groups of three, it will go through the