Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quitter object masked #43306

Closed
jimjjewett mannequin opened this issue May 1, 2006 · 4 comments
Closed

Quitter object masked #43306

jimjjewett mannequin opened this issue May 1, 2006 · 4 comments
Assignees

Comments

@jimjjewett
Copy link
Mannequin

jimjjewett mannequin commented May 1, 2006

BPO 1479785
Nosy @kbkaiser, @ronaldoussoren

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = 'https://github.com/kbkaiser'
closed_at = <Date 2007-02-05.17:40:49.000>
created_at = <Date 2006-05-01.15:01:40.000>
labels = ['expert-IDLE']
title = 'Quitter object masked'
updated_at = <Date 2007-02-05.17:40:49.000>
user = 'https://bugs.python.org/jimjjewett'

bugs.python.org fields:

activity = <Date 2007-02-05.17:40:49.000>
actor = 'kbk'
assignee = 'kbk'
closed = True
closed_date = None
closer = None
components = ['IDLE']
creation = <Date 2006-05-01.15:01:40.000>
creator = 'jimjjewett'
dependencies = []
files = []
hgrepos = []
issue_num = 1479785
keywords = []
message_count = 4.0
messages = ['28398', '28399', '28400', '28401']
nosy_count = 3.0
nosy_names = ['kbk', 'jimjjewett', 'ronaldoussoren']
pr_nums = []
priority = 'normal'
resolution = 'fixed'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue1479785'
versions = ['Python 2.5']

@jimjjewett
Copy link
Mannequin Author

jimjjewett mannequin commented May 1, 2006

2.5 introduces a Quitter object (defined in site.py)
to make the quit/exit message more friendly.

Lines 480-482 of PyShell.py override this, so that
users of Idle never see the improved feature.

Unfortunately, simply removing those lines isn't quite
enough to solve the problem, as IDLE catches
SystemExit exceptions. Getting around that, I didn't
have time to track down yet.

@jimjjewett jimjjewett mannequin closed this as completed May 1, 2006
@jimjjewett jimjjewett mannequin assigned kbkaiser May 1, 2006
@jimjjewett jimjjewett mannequin added the topic-IDLE label May 1, 2006
@kbkaiser
Copy link
Contributor

Logged In: YES
user_id=149084

Rev 51306: Patch bpo-1540892

@ronaldoussoren
Copy link
Contributor

Logged In: YES
user_id=580910

When I type quit() in the Python Shell window I get a dialog that says:

The program is still running!
Do you want to kill it?

(Python 2.5c1)

@kbkaiser
Copy link
Contributor

kbkaiser commented Feb 5, 2007

I don't see how to easily eliminate the dialog. When quit() runs, Quitter.__call__() closes IDLE's sys.stdin, and (since __call__() is still executing) that's trapped by PyShell.py using the logic which requires the user to confirm exit if he clicks on the Shell's close widget (WM_DELETE_WINDOW) while his code is running. If File.close() had a parameter, we might be able to do something about this.

The extra confirmation probably doesn't hurt. Aficionados will use Ctrl-D etc. anyway.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants