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

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

Closed
rhettinger opened this issue Sep 1, 2017 · 7 comments
Closed

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

rhettinger opened this issue Sep 1, 2017 · 7 comments
Assignees
Labels
3.7 expert-IDLE type-feature

Comments

@rhettinger
Copy link
Contributor

@rhettinger rhettinger commented Sep 1, 2017

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']

@rhettinger
Copy link
Contributor Author

@rhettinger rhettinger commented Sep 1, 2017

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

@rhettinger rhettinger added the 3.7 label Sep 1, 2017
@rhettinger rhettinger added expert-IDLE type-feature labels Sep 1, 2017
@serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Sep 1, 2017

This is a duplicate of #68400.

@rhettinger
Copy link
Contributor Author

@rhettinger rhettinger commented Sep 1, 2017

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.

@rhettinger rhettinger reopened this Sep 1, 2017
@rhettinger rhettinger changed the title Add __main__.py to IDLE Rename idlelib to just idle Sep 1, 2017
@terryjreedy
Copy link
Member

@terryjreedy terryjreedy commented Sep 1, 2017

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.

@merwok
Copy link
Member

@merwok merwok commented Sep 1, 2017

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

@terryjreedy
Copy link
Member

@terryjreedy terryjreedy commented Sep 4, 2017

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

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
@terryjreedy terryjreedy changed the title Rename idlelib to just idle Make 'python -m idle' work to start IDLE Aug 7, 2022
@terryjreedy
Copy link
Member

@terryjreedy terryjreedy commented Aug 7, 2022

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

terryjreedy added a commit to terryjreedy/cpython that referenced this issue Aug 9, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Aug 9, 2022
This enables accessing IDLE as 'idlelib' in the Doc Module listing.
(cherry picked from commit 70fc964)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
terryjreedy added a commit that referenced this issue Aug 9, 2022
This enables accessing IDLE as 'idlelib' in the Doc Module listing.
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Aug 9, 2022
This enables accessing IDLE as 'idlelib' in the Doc Module listing.
(cherry picked from commit 70fc9641b56144854777aef29c145cd10789e3df)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
miss-islington added a commit that referenced this issue Aug 9, 2022
This enables accessing IDLE as 'idlelib' in the Doc Module listing.
(cherry picked from commit 70fc964)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
miss-islington added a commit that referenced this issue Aug 9, 2022
This enables accessing IDLE as 'idlelib' in the Doc Module listing.
(cherry picked from commit 70fc964)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.7 expert-IDLE type-feature
Projects
Status: Done
Development

No branches or pull requests

4 participants