[issue37903] IDLE Shell sidebar.

Tal Einat report at bugs.python.org
Wed May 26 05:05:18 EDT 2021


Tal Einat <taleinat+python at gmail.com> added the comment:

> For teaching purposes in live demos, it is essential to have a clear visual distinction between the inputs and outputs:
>
> >>> beatles = ['john', 'paul', 'ringo', 'george']
> >>> [name.capitalize() for name in beatles]
> ['John', 'Paul', 'Ringo', 'George']
> >>> [name for name in beatles if 'n' in name]
> ['john', 'ringo']

Thanks for bringing this up. Lack of clear separation of inputs and outputs could be considered a drawback of putting prompts in a sidebar. 

Considering that the prompts *are not part of the code*, I do believe separating them more clearly is a benefit.  To support this, consider that in Jupyter notebooks, the prompts are also placed in a graphically-separated area to the left of both input and output "cells".

Also, do note that IDLE colors outputs differently from inputs, which helps differentiate them from inputs very clearly IMO.  Therefore, the examples in messages posted here are lacking in this regard.  For context, I'm attaching an image with screenshots before and after the change to use a sidebar.

Also, consider that previously, separation of outputs from inputs was not great for multi-line statements, as indentation was inconsistent and more vertical space was used:

>>> if True:
	print('Foo')
else:
	print('Bar')

	
Foo


I think that moving prompts into a sidebar is an improvement in this regard:

>>>| if True:
...| 	print('Foo')
...| else:
...| 	print('Bar')
...| 
   | Foo


Taking these three points together, I the sidebar clearly improves the separation of prompts from actual code, and the differentiation of outputs from inputs does not seem much worse, and is arguably overall better.

----------
Added file: https://bugs.python.org/file50065/IDLE shell befoe and after sidebar.png

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37903>
_______________________________________


More information about the Python-bugs-list mailing list