This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2009年08月13日 22:03 by gpolo, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| issue6698.patch | roger.serwy, 2011年12月11日 05:57 | review | ||
| Messages (18) | |||
|---|---|---|---|
| msg91536 - (view) | Author: Guilherme Polo (gpolo) * (Python committer) | Date: 2009年08月13日 22:03 | |
If someone configure IDLE to start a edit window by default, I believe it should open only an edit window without starting shell window. This has been the behaviour in previous version, but it is acting different now. I looked into r71126 and I think this behaviour was changed there unintentionally. Its log message doesn't seem to mention this change, that is why I'm thinking this. |
|||
| msg110981 - (view) | Author: Tal Einat (taleinat) * (Python committer) | Date: 2010年07月20日 23:00 | |
I agree on this. Unfortunately that change in r71126 wasn't commented on or documented in any way. |
|||
| msg111031 - (view) | Author: Tal Einat (taleinat) * (Python committer) | Date: 2010年07月21日 10:01 | |
After looking through the code and experimenting a bit, I propose the following:
The "editor-on-startup" config option should be removed. Running IDLE without arguments should open a shell. If IDLE is asked to open any files for editing, it should open just editor windows. IDLE should open both a shell window and one or more editor windows only when explicitly asked to do so on the command line.
If this is done, the -e option ("open an editor") would tell IDLE to open an empty editor window if no files are asked to be opened for editing. If no other arguments are given, IDLE will open just an editor window (no shell window). The -i option ("open a shell") would tell IDLE to open a shell window even if asked to open files for editing.
I think this is more obvious and easier to work with. It will also make the command line argument processing code simpler. And as a bonus we remove a config option :)
Thoughts? Comments? If there is agreements I will work up a patch.
|
|||
| msg111073 - (view) | Author: Ned Deily (ned.deily) * (Python committer) | Date: 2010年07月21日 15:11 | |
Keep in mind that, on OS X, there are two ways to invoke IDLE: one, by command line in a terminal window, and, two, by launching IDLE.app (explicitly, say by double-clicking on the app icon, or implictily, say by double-clicking on a .py file where IDLE.app is the default application for that file type). With IDLE.app there is no opportunity for the user to specify command line options. I suspect that on OS X IDLE.app is used far more frequently than the command line. |
|||
| msg111101 - (view) | Author: Tal Einat (taleinat) * (Python committer) | Date: 2010年07月21日 18:38 | |
My question is, when IDLE is run without arguments (as is the case for IDLE.app), what is the benefit opening an empty editor window as opposed to a shell window? In both cases if you just want to edit a file you must open it via the menus (e.g. File->Open or File->Recent Files), and an unused window is left open. On the other hand, if you do want a shell, having an empty editor window is useless. Therefore I think in this case it is always better to open a shell window. |
|||
| msg111154 - (view) | Author: Ronald Oussoren (ronaldoussoren) * (Python committer) | Date: 2010年07月22日 08:00 | |
The current behaviour on OSX for IDLE.app is to always open a shell window, and open edit windows for any files that should be opened during launch. IDLE.app does not open an empty edit window, and I agree that this is sane behaviour. One other thing that might be interesting to know: IDLE.app is already set up to open just a single instance of IDLE when users open python files from the Finder. |
|||
| msg149212 - (view) | Author: Roger Serwy (roger.serwy) * (Python committer) | Date: 2011年12月11日 05:57 | |
Attached is a patch to correct the existing bug as-is. Should the behavior of IDLE be changed as Tal suggests? |
|||
| msg151426 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2012年01月17日 02:54 | |
When I click r71126 it is mapped to bc084a97318b for #1529142 KBK msg85379 says "The -e option now only opens an editor window," I think I agree with Tal's suggestion as long as thing still work ok on Mac. It is trivial to open a new empty window from the shell. I have not looked at the current patch yet. |
|||
| msg185685 - (view) | Author: Roger Serwy (roger.serwy) * (Python committer) | Date: 2013年03月31日 22:12 | |
We can fix the "bug" as-is and then open a separate enhancement issue for Tal's suggestions. I place bug in quotes because the correct behavior is not documented. |
|||
| msg185704 - (view) | Author: Todd Rovito (Todd.Rovito) * | Date: 2013年04月01日 03:51 | |
Roger, I reviewed and tested the patch, it does seem to fix the "bug". Now when the on startup configure option is selected IDLE will behave as expected. I think this makes sense to fix the bug even though it is not documented we can infer the behavior based on the configuration dialog box. Tal's suggestion makes sense but this is for sure an enhancement. Please feel free to push the patch at your earliest convenience. |
|||
| msg185707 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2013年04月01日 04:39 | |
New changeset 240c83902fca by Roger Serwy in branch '2.7': #6698: IDLE now opens just an editor window when configured to do so. http://hg.python.org/cpython/rev/240c83902fca New changeset 174caf4c901a by Roger Serwy in branch '3.3': #6698: IDLE now opens just an editor window when configured to do so. http://hg.python.org/cpython/rev/174caf4c901a New changeset ee5806d231db by Roger Serwy in branch 'default': #6698: merge with 3.3. http://hg.python.org/cpython/rev/ee5806d231db |
|||
| msg185709 - (view) | Author: Roger Serwy (roger.serwy) * (Python committer) | Date: 2013年04月01日 04:48 | |
Thanks Todd for the review! If you have time, could you open a new issue to deal with the enhancements discussed here? |
|||
| msg185710 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2013年04月01日 04:50 | |
If we are not sure of the 'right' behavior in cases like this, we can ask for opinions on idle-dev. That is at least part of its purpose. Does anyone there use any of the options? |
|||
| msg185713 - (view) | Author: Roger Serwy (roger.serwy) * (Python committer) | Date: 2013年04月01日 05:07 | |
Terry, I read over the revision in r71126 and it looked like the behavior change was an unintended consequence of applying an ephemeral ports patch. That and Todd's reasoning of the correct behavior being inferrable from the configuration dialog convinced me that original behavior described by Guilherme was the correct behavior. Changing those options ought to be a separate enhancment issue. |
|||
| msg185717 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2013年04月01日 05:39 | |
If at least three of you are in agreement, great. Take my comment as a general one for other issues, when applicable ;-). |
|||
| msg185719 - (view) | Author: Roger Serwy (roger.serwy) * (Python committer) | Date: 2013年04月01日 05:48 | |
Will do, Terry! :-) |
|||
| msg185720 - (view) | Author: Ned Deily (ned.deily) * (Python committer) | Date: 2013年04月01日 05:51 | |
With the patch applied, I verified that the launch behavior of OS X IDLE.app is unchanged as expected. |
|||
| msg185730 - (view) | Author: Todd Rovito (Todd.Rovito) * | Date: 2013年04月01日 11:46 | |
Roger, Yes I will add another issue covering the enhancement. Ned, Thanks for the review. I forgot to mention it but I too tested on the Mac :-). |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:56:51 | admin | set | github: 50947 |
| 2013年04月01日 11:46:44 | Todd.Rovito | set | messages: + msg185730 |
| 2013年04月01日 05:51:51 | ned.deily | set | messages: + msg185720 |
| 2013年04月01日 05:48:27 | roger.serwy | set | messages: + msg185719 |
| 2013年04月01日 05:39:42 | terry.reedy | set | messages: + msg185717 |
| 2013年04月01日 05:07:07 | roger.serwy | set | messages: + msg185713 |
| 2013年04月01日 04:50:52 | terry.reedy | set | messages: + msg185710 |
| 2013年04月01日 04:48:00 | roger.serwy | set | status: open -> closed resolution: fixed messages: + msg185709 stage: patch review -> resolved |
| 2013年04月01日 04:39:25 | python-dev | set | nosy:
+ python-dev messages: + msg185707 |
| 2013年04月01日 03:51:45 | Todd.Rovito | set | messages: + msg185704 |
| 2013年03月31日 22:12:40 | roger.serwy | set | nosy:
+ Todd.Rovito messages: + msg185685 assignee: roger.serwy type: behavior stage: patch review |
| 2012年01月17日 02:54:22 | terry.reedy | set | nosy:
+ terry.reedy messages: + msg151426 versions: + Python 3.3, - Python 3.1 |
| 2011年12月11日 05:57:46 | roger.serwy | set | files:
+ issue6698.patch nosy: + roger.serwy messages: + msg149212 keywords: + patch |
| 2010年07月22日 08:00:12 | ronaldoussoren | set | nosy:
+ ronaldoussoren messages: + msg111154 |
| 2010年07月21日 18:38:19 | taleinat | set | messages: + msg111101 |
| 2010年07月21日 15:11:47 | ned.deily | set | nosy:
+ ned.deily messages: + msg111073 |
| 2010年07月21日 10:01:33 | taleinat | set | messages: + msg111031 |
| 2010年07月20日 23:00:18 | taleinat | set | nosy:
+ taleinat messages: + msg110981 |
| 2009年08月13日 22:03:09 | gpolo | create | |