Show entire demo on screen, block by block
(self)
| 426 | sys.stdout.flush() |
| 427 | |
| 428 | def show_all(self): |
| 429 | """Show entire demo on screen, block by block""" |
| 430 | |
| 431 | fname = self.title |
| 432 | title = self.title |
| 433 | nblocks = self.nblocks |
| 434 | silent = self._silent |
| 435 | marquee = self.marquee |
| 436 | for index,block in enumerate(self.src_blocks_colored): |
| 437 | if silent[index]: |
| 438 | print(marquee('<%s> SILENT block # %s (%s remaining)' % |
| 439 | (title,index,nblocks-index-1))) |
| 440 | else: |
| 441 | print(marquee('<%s> block # %s (%s remaining)' % |
| 442 | (title,index,nblocks-index-1))) |
| 443 | print(block, end=' ') |
| 444 | sys.stdout.flush() |
| 445 | |
| 446 | def run_cell(self,source): |
| 447 | """Execute a string with one or more lines of code""" |