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