Skip to content

Make 'python -m idle' work to start IDLE #75500

Closed

Description

@rhettinger
BPO 31319
Nosy @rhettinger, @terryjreedy, @merwok, @serhiy-storchaka, @aaronchall

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/terryjreedy'
closed_at = <Date 2017-09-04.06:33:57.650>
created_at = <Date 2017-09-01.06:56:13.600>
labels = ['expert-IDLE', 'type-feature', '3.7']
title = 'Rename idlelib to just idle'
updated_at = <Date 2017-09-04.06:33:57.608>
user = 'https://github.com/rhettinger'

bugs.python.org fields:

activity = <Date 2017-09-04.06:33:57.608>
actor = 'terry.reedy'
assignee = 'terry.reedy'
closed = True
closed_date = <Date 2017-09-04.06:33:57.650>
closer = 'terry.reedy'
components = ['IDLE']
creation = <Date 2017-09-01.06:56:13.600>
creator = 'rhettinger'
dependencies = []
files = []
hgrepos = []
issue_num = 31319
keywords = []
message_count = 6.0
messages = ['301086', '301087', '301088', '301106', '301137', '301210']
nosy_count = 5.0
nosy_names = ['rhettinger', 'terry.reedy', 'eric.araujo', 'serhiy.storchaka', 'Aaron Hall']
pr_nums = []
priority = 'low'
resolution = 'later'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue31319'
versions = ['Python 3.7']

Activity

  1. rhettinger commented on Sep 1, 2017

    @rhettinger
    ContributorAuthor

    Currently, I start IDLE with:

      $ python -m idlelib.idle

    It would be nice add __main__.py to simplify this to:

      $ python -m idlelib

    And perhaps, more boldly rename the directory so that we get:

      $ python -m idle
  2. serhiy-storchaka commented on Sep 1, 2017

    @serhiy-storchaka
    Member

    This is a duplicate of #68400.

  3. rhettinger commented on Sep 1, 2017

    @rhettinger
    ContributorAuthor

    I would also like Terry to consider renaming or aliasing idlelib to idle. That would further simplify the startup and it is a more appropriate name given that IDLE is used as an application rather than as a library.

  4. changed the title [-]Add __main__.py to IDLE[/-] [+]Rename idlelib to just idle[/+] on Sep 1, 2017
  5. terryjreedy commented on Sep 1, 2017

    @terryjreedy
    Member

    idlelib.__main__ was added in 3.3: Patch was d543f2b
    Author: Andrew Svetlov <andrew.svetlov@gmail.com>
    Date: 3/26/2012 3:11:46 PM
    Message: IDLE can be launched as python -m ildelib [misspelled]

    #68400 was about backporting the addition to 2.7. I opened it after PEP-434 clearly made this permitted. The attempt had the problems described therein.
    ---

    I quite agree that 'python -m idle' would be nicer than 'python -m idlelib', just as the latter is nicer than idlelib.idle or idlelib.pyshell. However, switching would break every text (and program) that tell people about any of the latter three. That would include many of my (and other people's) Stackoverflow comments and answers. I am therefore neither inclined to do this, nor do I think I am allowed to by out back-compatibility policies.

    My impression is that the directory name linking needed to make both work without two copies is OS specific and not something that can be done in the repository. I don't even know how to do it properly on Windows. I am not going to try to get all installer makers to agree to make a change.

  6. merwok commented on Sep 1, 2017

    @merwok
    Member

    What about adding a simple Lib/idle.py that imports and runs the main function from idlelib?

  7. terryjreedy commented on Sep 4, 2017

    @terryjreedy
    Member

    Hi Éric. Adding idle.py would make -m idle work. But I believe it would violate existing policy. So I will not propose it on python-ideas or pydev and hope no one else does either.

    PEP-434, at least in part, formalized what I believe was older practice with respect to idlelib. I was surprised by the negative reaction that ensued and do not want a repeat.

    Raymond, I have considered this at length and see no prospect for a positive change at this time.

    This issue reminded me to open #75510, to index 'idlelib' and better document the options for starting IDLE..

  8. transferred this issue fromon Apr 10, 2022
  9. 1 remaining item

  10. changed the title [-]Rename idlelib to just idle[/-] [+]Make 'python -m idle' work to start IDLE[/+] on Aug 7, 2022
  11. terryjreedy commented on Aug 7, 2022

    @terryjreedy
    Member

    Summary of options to make 'python -m idle' start IDLE, with 3 more added.

    1. Rename idlelib to idle. Easy but rejected for breaking too much.

    2. Symlink idle to idlelib.

    3. Add /Lib/idle.py.

    4. (0+1) Rename idlelib to idle and symlink idlelib to idle.

    5. (0+2) Rename idlelib' to idleand idlelib`.

    6. Teach the -m function to recognize 'idle' as an alias for 'idlelib'.

    7. leave /Lib alone; the mechanism could be used for other modules if desired (though I have no candidates at the moment).

  12. added a commit that references this issue on Aug 9, 2022
  13. added a commit that references this issue on Aug 9, 2022
  14. added a commit that references this issue on Aug 9, 2022
  15. added 3 commits that reference this issue on Aug 9, 2022
  16. added a commit that references this issue on Aug 11, 2022
  17. added a commit that references this issue on Sep 3, 2022
  18. added a commit that references this issue on Sep 3, 2022
  19. added 2 commits that reference this issue on Sep 3, 2022
  20. added a commit that references this issue on Sep 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions