Issue 1479785: Quitter object masked (original) (raw)
This issue has been migrated to GitHub: https://github.com/python/cpython/issues/43306
classification
Title: | Quitter object masked | ||
---|---|---|---|
Type: | Stage: | ||
Components: | IDLE | Versions: | Python 2.5 |
process
Status: | closed | Resolution: | fixed |
---|---|---|---|
Dependencies: | Superseder: | ||
Assigned To: | kbk | Nosy List: | jimjjewett, kbk, ronaldoussoren |
Priority: | normal | Keywords: |
Created on 2006-05-01 15:01 by jimjjewett, last changed 2022-04-11 14:56 by admin. This issue is now closed.
Messages (4) | ||
---|---|---|
msg28398 - (view) | Author: Jim Jewett (jimjjewett) | Date: 2006-05-01 15:01 |
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. | ||
msg28399 - (view) | Author: Kurt B. Kaiser (kbk) * ![]() |
Date: 2006-08-16 05:03 |
Logged In: YES user_id=149084 Rev 51306: Patch #1540892 | ||
msg28400 - (view) | Author: Ronald Oussoren (ronaldoussoren) * ![]() |
Date: 2006-08-28 16:43 |
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) | ||
msg28401 - (view) | Author: Kurt B. Kaiser (kbk) * ![]() |
Date: 2007-02-05 17:40 |
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. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:56:17 | admin | set | github: 43306 |
2006-05-01 15:01:40 | jimjjewett | create |