Idle's Shell: prompts and indents (was ...) Idle users please read

Terry Reedy tjreedy at
Mon Jul 21 05:28:21 CEST 2014

On 7/20/2014 8:55 PM, Chris Angelico wrote:

>> Idea 4 (which I already suggested on the tracker). Put statement input
>> prompts and output separators on lines by themselves.  As with 3. above, use
>> standard 4 space indents, as with
>>>>> :
>> def f(x):
>>      if x:
>>          print('got it')
>>          return 'something'
>>>>> :
>> f(3)
>> ---
>> got it
>>>>> :
>> Idle users other than Rick, any comments on the possible improvements?

Note that single multiline statements can be directly copied for pasting 
by the normal method.

> I can't comment on how it interacts with the editor half of Idle, but
> for the shell as a stand-alone app, and for copying and pasting into
> other programs, this last idea is rather interesting. I'm broadly
> happy with the current system (>>> def f(x):), and the prompt is a
> little weird (">>>:"? but maybe "Python:" would be less weird; I don't
> advise "Idle:" as it implies that something is idle that might be
> busy), but this would make copy/paste that bit easier. It would tend
> to de-emphasize the difference between input and output, though, which
> may or may not be an issue. But definitely interesting.

The prompt and separator could be configurable.

A few users have noticed (and complained) that setting sys.ps1 and 
sys.ps2 *in the batch mode user process* has no effect. The Idle doc 
should better explain why this is and should be.  User code should not 
affect the operation of Idle. Idle is separately configured through dialogs.

Terry Jan Reedy

More information about the Python-list mailing list