diff options
author | Nikita Slyusarev <nslus@yandex-team.com> | 2022-02-10 16:46:53 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:53 +0300 |
commit | 469afdc4e2587bf62ecdd096b75a0baa444c4012 (patch) | |
tree | 49e222ea1c5804306084bb3ae065bb702625360f /contrib/python/ipython/py2/IPython/lib/demo.py | |
parent | cd77cecfc03a3eaf87816af28a33067c4f0cdb59 (diff) | |
download | ydb-469afdc4e2587bf62ecdd096b75a0baa444c4012.tar.gz |
Restoring authorship annotation for Nikita Slyusarev <nslus@yandex-team.com>. Commit 2 of 2.
Diffstat (limited to 'contrib/python/ipython/py2/IPython/lib/demo.py')
-rw-r--r-- | contrib/python/ipython/py2/IPython/lib/demo.py | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/contrib/python/ipython/py2/IPython/lib/demo.py b/contrib/python/ipython/py2/IPython/lib/demo.py index 7b047ad82a..b0f3503ed7 100644 --- a/contrib/python/ipython/py2/IPython/lib/demo.py +++ b/contrib/python/ipython/py2/IPython/lib/demo.py @@ -326,7 +326,7 @@ class Demo(object): if index is None: if self.finished: - print('Demo finished. Use <demo_name>.reset() if you want to rerun it.') + print('Demo finished. Use <demo_name>.reset() if you want to rerun it.') return None index = self.block_index else: @@ -397,8 +397,8 @@ class Demo(object): return print(self.marquee('<%s> block # %s (%s remaining)' % - (self.title,index,self.nblocks-index-1))) - print(self.src_blocks_colored[index]) + (self.title,index,self.nblocks-index-1))) + print(self.src_blocks_colored[index]) sys.stdout.flush() def show_all(self): @@ -412,11 +412,11 @@ class Demo(object): for index,block in enumerate(self.src_blocks_colored): if silent[index]: print(marquee('<%s> SILENT block # %s (%s remaining)' % - (title,index,nblocks-index-1))) + (title,index,nblocks-index-1))) else: print(marquee('<%s> block # %s (%s remaining)' % - (title,index,nblocks-index-1))) - print(block, end=' ') + (title,index,nblocks-index-1))) + print(block, end=' ') sys.stdout.flush() def run_cell(self,source): @@ -442,17 +442,17 @@ class Demo(object): self.block_index += 1 if self._silent[index]: print(marquee('Executing silent block # %s (%s remaining)' % - (index,self.nblocks-index-1))) + (index,self.nblocks-index-1))) else: self.pre_cmd() self.show(index) if self.auto_all or self._auto[index]: - print(marquee('output:')) + print(marquee('output:')) else: - print(marquee('Press <q> to quit, <Enter> to execute...'), end=' ') + print(marquee('Press <q> to quit, <Enter> to execute...'), end=' ') ans = py3compat.input().strip() if ans: - print(marquee('Block NOT executed')) + print(marquee('Block NOT executed')) return try: save_argv = sys.argv @@ -470,10 +470,10 @@ class Demo(object): if self.block_index == self.nblocks: mq1 = self.marquee('END OF DEMO') if mq1: - # avoid spurious print if empty marquees are used - print() - print(mq1) - print(self.marquee('Use <demo_name>.reset() if you want to rerun it.')) + # avoid spurious print if empty marquees are used + print() + print(mq1) + print(self.marquee('Use <demo_name>.reset() if you want to rerun it.')) self.finished = True # These methods are meant to be overridden by subclasses who may wish to |