##// END OF EJS Templates
- Small fix to demos to flush stdout on each printed block.
fperez -
r147:b5268b71
parent child
Show More
@@ -242,6 +242,7 class Demo:
242 print marquee('<%s> block # %s (%s remaining)' %
242 print marquee('<%s> block # %s (%s remaining)' %
243 (self.fname,index,self.nblocks-index-1))
243 (self.fname,index,self.nblocks-index-1))
244 print self.src_blocks_colored[index],
244 print self.src_blocks_colored[index],
245 sys.stdout.flush()
245
246
246 def show_all(self):
247 def show_all(self):
247 """Show entire demo on screen, block by block"""
248 """Show entire demo on screen, block by block"""
@@ -257,6 +258,7 class Demo:
257 print marquee('<%s> block # %s (%s remaining)' %
258 print marquee('<%s> block # %s (%s remaining)' %
258 (fname,index,nblocks-index-1))
259 (fname,index,nblocks-index-1))
259 print block,
260 print block,
261 sys.stdout.flush()
260
262
261 def __call__(self,index=None):
263 def __call__(self,index=None):
262 """run a block of the demo.
264 """run a block of the demo.
@@ -1,3 +1,8
1 2006-01-25 Fernando Perez <Fernando.Perez@colorado.edu>
2
3 * IPython/demo.py (Demo.show): Flush stdout after each block, so
4 computationally intensive blocks don't appear to stall the demo.
5
1 2006-01-24 Ville Vainio <vivainio@gmail.com>
6 2006-01-24 Ville Vainio <vivainio@gmail.com>
2
7
3 * iplib.py, hooks.py: 'result_display' hook can return a non-None
8 * iplib.py, hooks.py: 'result_display' hook can return a non-None
General Comments 0
You need to be logged in to leave comments. Login now