[issue27573] code.interact() should print an exit message

2016-08-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c4863530cfd6 by Steven D'Aprano in branch 'default':
Issue #27573 make the exit message configurable.
https://hg.python.org/cpython/rev/c4863530cfd6

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27573] code.interact() should print an exit message

2016-08-23 Thread Steven D'Aprano

Steven D'Aprano added the comment:

On Thu, Aug 18, 2016 at 12:26:56PM +, Armin Rigo wrote:
> ...ah, upon closer inspection, we don't use the ``interact()`` method 
> anyway.  We already copied and tweaked this method: one problem was 
> that it gives no way to run without printing at least one '\n' of 
> banner at the beginning.  Then a more important tweak was made when we 
> added multiline input with `pyrepl` by default.  So feel free to 
> ignore my request.

I think making the exit message configurable is a good idea even if PyPy 
doesn't do it, and it should be an easy few lines, so I'll do it even if 
you don't need it for PyPy.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27573] code.interact() should print an exit message

2016-08-18 Thread Armin Rigo

Armin Rigo added the comment:

...ah, upon closer inspection, we don't use the ``interact()`` method anyway.  
We already copied and tweaked this method: one problem was that it gives no way 
to run without printing at least one '\n' of banner at the beginning.  Then a 
more important tweak was made when we added multiline input with `pyrepl` by 
default.  So feel free to ignore my request.

(Multiline input is great, btw, if you use the interactive Python a lot.  That 
would be a completely different patch---if I thought that there's a good chance 
of it not languishing forever on this bug tracker, which I honestly don't think 
is the case...)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27573] code.interact() should print an exit message

2016-08-18 Thread Armin Rigo

Armin Rigo added the comment:

I'm fine with `exitmsg`.  I guess it would be a flag (not `None` as you wrote), 
defaulting to `True`?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27573] code.interact() should print an exit message

2016-08-18 Thread Steven D'Aprano

Steven D'Aprano added the comment:

On Thu, Aug 18, 2016 at 08:19:25AM +, Armin Rigo wrote:
> Can we make the exit message optional?

Sure. What API do you prefer? I'm thinking to just give interact() an 
optional "exitmsg" argument, similar to banner:

def interact(banner=None, readfunc=None, local=None, exitmsg=None):

and similar for InteractiveConsole.interact.

If you're happy with that, I should be able to get the change done over 
this coming weekend.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27573] code.interact() should print an exit message

2016-08-18 Thread Armin Rigo

Armin Rigo added the comment:

Can we make the exit message optional?  Otherwise PyPy will need to patch 
code.py to add the option to not display this message when used as the normal 
REPL (yes, PyPy uses the plain code.py as its built-in REPL).

--
nosy: +arigo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27573] code.interact() should print an exit message

2016-08-14 Thread Steven D'Aprano

Changes by Steven D'Aprano :


--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27573] code.interact() should print an exit message

2016-08-14 Thread Ned Deily

Ned Deily added the comment:

Steven, don't forget to update Misc/NEWS and to close this issue on the bug 
tracker.  Thanks!

--
nosy: +ned.deily

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27573] code.interact() should print an exit message

2016-08-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 9410dc027505 by Steven D'Aprano in branch 'default':
Issue27573 code.interact prints a message when exiting.
https://hg.python.org/cpython/rev/9410dc027505

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27573] code.interact() should print an exit message

2016-08-14 Thread Paul Moore

Paul Moore added the comment:

LGTM. Maybe worth a documentation note - "Changed in 3.6 - added an exit 
message"? But I'm OK with it as is if you don't think that's worth it.

--
nosy: +paul.moore

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27573] code.interact() should print an exit message

2016-08-14 Thread Brett Cannon

Brett Cannon added the comment:

LGTM

--
assignee:  -> steven.daprano
nosy: +brett.cannon

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27573] code.interact() should print an exit message

2016-07-19 Thread Steven D'Aprano

Steven D'Aprano added the comment:

This time, with a patch that includes updated tests.

--
Added file: http://bugs.python.org/file43793/code.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27573] code.interact() should print an exit message

2016-07-19 Thread Steven D'Aprano

Changes by Steven D'Aprano :


Removed file: http://bugs.python.org/file43791/code.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue27573] code.interact() should print an exit message

2016-07-19 Thread Steven D'Aprano

New submission from Steven D'Aprano:

Way too often I've lost track of whether I'm in the code.interact() REPL or the 
original REPL, or hit Ctrl-D once too often, and accidentally quit the real 
REPL. It is easy to lose track, since the real and imitation REPL both use the 
same prompts.

It would be useful if code.interact() and the InteractiveConsole printed a 
message when they exited.

--
components: Library (Lib)
files: code.patch
keywords: patch
messages: 270822
nosy: steven.daprano
priority: normal
severity: normal
status: open
title: code.interact() should print an exit message
type: enhancement
versions: Python 3.6
Added file: http://bugs.python.org/file43791/code.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com