Skip to content

IDLE no longer opens only an edit window when configured to do so #50947

Closed

Description

@gpolo
mannequin
BPO 6698
Nosy @terryjreedy, @ronaldoussoren, @taleinat, @ned-deily, @serwy, @rovitotv
Files
  • issue6698.patch
  • 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/serwy'
    closed_at = <Date 2013-04-01.04:48:00.395>
    created_at = <Date 2009-08-13.22:03:09.667>
    labels = ['expert-IDLE', 'type-bug']
    title = 'IDLE no longer opens only an edit window when configured to do so'
    updated_at = <Date 2013-04-01.11:46:44.476>
    user = 'https://bugs.python.org/gpolo'

    bugs.python.org fields:

    activity = <Date 2013-04-01.11:46:44.476>
    actor = 'Todd.Rovito'
    assignee = 'roger.serwy'
    closed = True
    closed_date = <Date 2013-04-01.04:48:00.395>
    closer = 'roger.serwy'
    components = ['IDLE']
    creation = <Date 2009-08-13.22:03:09.667>
    creator = 'gpolo'
    dependencies = []
    files = ['23911']
    hgrepos = []
    issue_num = 6698
    keywords = ['patch']
    message_count = 18.0
    messages = ['91536', '110981', '111031', '111073', '111101', '111154', '149212', '151426', '185685', '185704', '185707', '185709', '185710', '185713', '185717', '185719', '185720', '185730']
    nosy_count = 8.0
    nosy_names = ['terry.reedy', 'ronaldoussoren', 'taleinat', 'gpolo', 'ned.deily', 'roger.serwy', 'Todd.Rovito', 'python-dev']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue6698'
    versions = ['Python 2.7', 'Python 3.2', 'Python 3.3']

    Activity

    1. gpolo commented on Aug 13, 2009

      gpolomannequin
      MannequinAuthor

      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.

    2. taleinat commented on Jul 20, 2010

      @taleinat
      Contributor

      I agree on this. Unfortunately that change in r71126 wasn't commented on or documented in any way.

    3. taleinat commented on Jul 21, 2010

      @taleinat
      Contributor

      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.

    4. ned-deily commented on Jul 21, 2010

      @ned-deily
      Member

      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.

    5. taleinat commented on Jul 21, 2010

      @taleinat
      Contributor

      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.

    6. ronaldoussoren commented on Jul 22, 2010

      @ronaldoussoren
      Contributor

      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.

    7. serwy commented on Dec 11, 2011

      serwymannequin
      Mannequin

      Attached is a patch to correct the existing bug as-is.

      Should the behavior of IDLE be changed as Tal suggests?

    8. terryjreedy commented on Jan 17, 2012

      @terryjreedy
      Member

      When I click r71126 it is mapped to bc084a97318b for bpo-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.

    9. serwy commented on Mar 31, 2013

      serwymannequin
      Mannequin

      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.

    10. self-assigned this
      on Mar 31, 2013
    11. added
      type-bugAn unexpected behavior, bug, or error
      on Mar 31, 2013
    12. rovitotv commented on Apr 1, 2013

      rovitotvmannequin
      Mannequin

      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.

    13. python-dev commented on Apr 1, 2013

      python-devmannequin
      Mannequin

      New changeset 240c83902fca by Roger Serwy in branch '2.7':
      bpo-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':
      bpo-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':
      bpo-6698: merge with 3.3.
      http://hg.python.org/cpython/rev/ee5806d231db

    14. serwy commented on Apr 1, 2013

      serwymannequin
      Mannequin

      Thanks Todd for the review! If you have time, could you open a new issue to deal with the enhancements discussed here?

    15. terryjreedy commented on Apr 1, 2013

      @terryjreedy
      Member

      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?

    16. serwy commented on Apr 1, 2013

      serwymannequin
      Mannequin

      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.

    17. terryjreedy commented on Apr 1, 2013

      @terryjreedy
      Member

      If at least three of you are in agreement, great. Take my comment as a general one for other issues, when applicable ;-).

    18. serwy commented on Apr 1, 2013

      serwymannequin
      Mannequin

      Will do, Terry! :-)

    19. ned-deily commented on Apr 1, 2013

      @ned-deily
      Member

      With the patch applied, I verified that the launch behavior of OS X IDLE.app is unchanged as expected.

    20. rovitotv commented on Apr 1, 2013

      rovitotvmannequin
      Mannequin

      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 :-).

    21. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    Labels

    topic-IDLEtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions