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.

classification
Title: 3.9 IDLE documentation.
Type: enhancement Stage: resolved
Components: Documentation, IDLE Versions: Python 3.10
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Add idlelib module entry to doc
View: 31329
Assigned To: docs@python Nosy List: c.v.horie, docs@python, epaine, terry.reedy
Priority: normal Keywords:

Created on 2020-10-07 13:54 by c.v.horie, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (7)
msg378161 - (view) Author: Velson Horie (c.v.horie) Date: 2020-10-07 13:54
https://docs.python.org/3/library/idle.html
I am trying to sort out why a new installation of 3.9 onto Win10 64bit fails to associate a .py file type with IDLE. {hint - there is no idle.exe. installed - Why?}. 2.7, 3.6 and 3.8 worked fine.
The documentation gives no indication of the source format of "IDLE", where it might be found, what it calls etc - only how it is used.
Some indication/link to the underlying software structure should be included in the documentation.
PS thank you for all the other work involved.
msg378173 - (view) Author: E. Paine (epaine) * Date: 2020-10-07 17:19
I am not touching the issue nosy and components for now but suspect this is a Windows installation issue. As you said, there is no `idle.exe` file and instead file association is done through a `idle.bat` file found at Lib/idlelib/idle.bat. I have a few of questions that I would appreciate if you could answer to give some more context:
 - What behaviour is incorrect? Is it that double clicking doesn't launch python.exe or there is no "edit with IDLE" entry in the right-click menu?
 - Did you install it for different users compared to the other versions (all users / admin vs. just for this user)
 - Do you have any other Python versions installed simultaneously with 3.9?

I agree it may be nice to give a brief overview on IDLE's "behind-the-scenes" though I am slightly confused why you raised this issue as a documentation issue.
msg378202 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-10-08 00:07
I agree that the doc needs more, but I am closing this as a duplicate of #31329, which is specifically doc about starting IDLE.  You can still answer Paine's questions here if you want.

File association: IDLE is not Python.  It is one of many Python-oriented editors and IDEs.  .py files are and by default should be associated for running with something that runs the file with python.exe.  On Windows, this is done via C:/Windows/py.exe.  The default version for double clicking is determined by a checkmark in the installer.

The Windows installer does associate .py files with IDLE for editing: rt click, edit with IDLE ....

idle.exe is not needed for starting idle.

I don't know what you mean by 'source format'.  IDLE is written in Python.  The directory structure is mostly implementation detail not relevant to using IDLE.  File are described in idlelib/README.txt.  This might be mentioned in the doc.
msg378256 - (view) Author: Velson Horie (c.v.horie) Date: 2020-10-08 16:34
As Terry said, the issue of Idle not starting by a .py file association was
raised in another thread. That parenthesis was mentioned to give context to
the documentation enquiry.  In my new 3.9 installation, I could find
idle.bat, but I had just been told by the Microsoft help engineer that it
was possible to make an association with a file type only by pointing to an
.exe file.  (I could find idle.exe in a 3.8 installation on a different
computer, buried deep in hidden AppData folders.)

This post was specifically about the documentation.  One of the
difficulties of a Python installation is that it is really difficult to
find where and how all the many and various strands of Python interact, how
the sources are linked into a structure [I grew up pre-Windows with
MS-DOS]. I was trying to find where the idle.exe was placed in the
installation, since Windows requires (apparently) an explicitly stated
folder/application.

So I went to the IDLE documentation page to find how IDLE was implemented
as a program, and how I might find "it", and where "it" was placed in the
folder structure in my new installation.
But those mechanics are not mentioned on that page.
So-  my post on documentation.

I apologise for the confusion.  However in the past, I had a similar
experience loading anaconda etc, where the files disappeared without trace
onto a hard drive. So I deleted the package (as best I can) because I don't
know what is happening.

On Thu, 8 Oct 2020 at 01:07, Terry J. Reedy <report@bugs.python.org> wrote:

>
> Terry J. Reedy <tjreedy@udel.edu> added the comment:
>
> I agree that the doc needs more, but I am closing this as a duplicate of
> #31329, which is specifically doc about starting IDLE.  You can still
> answer Paine's questions here if you want.
>
> File association: IDLE is not Python.  It is one of many Python-oriented
> editors and IDEs.  .py files are and by default should be associated for
> running with something that runs the file with python.exe.  On Windows,
> this is done via C:/Windows/py.exe.  The default version for double
> clicking is determined by a checkmark in the installer.
>
> The Windows installer does associate .py files with IDLE for editing: rt
> click, edit with IDLE ....
>
> idle.exe is not needed for starting idle.
>
> I don't know what you mean by 'source format'.  IDLE is written in
> Python.  The directory structure is mostly implementation detail not
> relevant to using IDLE.  File are described in idlelib/README.txt.  This
> might be mentioned in the doc.
>
> ----------
> resolution:  -> duplicate
> stage:  -> resolved
> status: open -> closed
> superseder:  -> Add idlelib module entry to doc
> type:  -> enhancement
> versions: +Python 3.10 -Python 3.9
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue41968>
> _______________________________________
>
msg378259 - (view) Author: Velson Horie (c.v.horie) Date: 2020-10-08 17:27
Paine: thank you for your offer to sort the problem out.
See my answer to Terry for a  further introduction to the situation.

My laptop's operating system Win10 64 bit was mashed by Windows update
1909. I deleted 3.6, loaded 3.8 (but that didn't work because the system
had been converted from 64 to 32 bit). Deleted 3.8, installed update 2004,
then 3.9.  I then tried to run my (simple and small) .py code by double
clicking, and that failed.  So I tried to associate the .py files with any
of the various python options presented by Windows - didn't work. I then
found buried in the folder structure a copy of idle.bat so I made the
association. That didn't work.  Meanwhile the option to edit with IDLE,
which I noticed early on but which did not appear in "open with" options,
had disappeared.  So I asked the Microsoft help chat.  Who said that
idle.bat would not work anyway.  I tried to copy idle.exe from my desktop
(3.8) to my laptop (3.9). but no luck.
I was stuck, so raised my query on the topic of idle.exe.

I have installed 3.9 for all users and clicking the PATH box, and on
C:\Program Files\Python39, which is declared on the environmental variable
list.

I had gone to the documentation page to sort the problem myself, but that
provided no relevant help, so raised the query about that page.

You have made clear that it is not really a Python issue, but my initial
mistake with Windows.
Have you any idea how I might undo the various wrong associations to get
back to the "edit with IDLE option" - reinstall 3.9?.  If not, I shall have
another go with Microsoft help.

Thank you

On Wed, 7 Oct 2020 at 18:20, E. Paine <report@bugs.python.org> wrote:

>
> E. Paine <paineelisha@gmail.com> added the comment:
>
> I am not touching the issue nosy and components for now but suspect this
> is a Windows installation issue. As you said, there is no `idle.exe` file
> and instead file association is done through a `idle.bat` file found at
> Lib/idlelib/idle.bat. I have a few of questions that I would appreciate if
> you could answer to give some more context:
>  - What behaviour is incorrect? Is it that double clicking doesn't launch
> python.exe or there is no "edit with IDLE" entry in the right-click menu?
>  - Did you install it for different users compared to the other versions
> (all users / admin vs. just for this user)
>  - Do you have any other Python versions installed simultaneously with 3.9?
>
> I agree it may be nice to give a brief overview on IDLE's
> "behind-the-scenes" though I am slightly confused why you raised this issue
> as a documentation issue.
>
> ----------
> nosy: +epaine
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue41968>
> _______________________________________
>
msg378265 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2020-10-08 18:32
Velson, when you respond to a post by email, rather than on the web page, please delete the post you are responding to, except for maybe a quoted line or two.  When your response is added to the web page below previous posts, posts quoted in full constitute noise that makes the stream of posts harder to read.

I forgot to mention above that I added a link to this issue on #31329 so that when I work on that, I will be reminded to read comments here also.
They will be helpful.

IDLE is intended for learning to write Python programs and to develop programs that can be run directly with Python, without IDLE.  It is not intended for production runs (though there are a few cases where that might be sensible).  So, to run with IDLE, edit with IDLE and hit F5.

I installed 3.9.0 with the python.org Windows installer and clicked "[X] make this default" (or however that is worded, top of second page, I believe).  Double-clicking file.py or right-clicking and clicking Open runs the file with C:/Windows/py.exe, as I said in my first response.  py.exe then runs the file with the default python.exe.  Right-click also shows Edit with IDLE and a choice of versions.  To get this on your system, you probably best delete all pythons on your system and start over with the python.org installer.  For any more help on installing and using Python, please post to the python-list mail list.
msg378435 - (view) Author: E. Paine (epaine) * Date: 2020-10-11 13:51
If you had a bad update, it is likely your registry is corrupt. If at all possible, I would recommend a Windows reinstall (it is quite likely other software has also been affected). However, in the past I have had similar problems and the Python installer does seem particularly susceptible to problems if corruption occurs (I resolved this without a Windows reinstall by uninstalling Python then deleting all registry entries related to it - though I would not recommend this more generally). I may take this up with Steve (in a separate issue) to see if we can make the installer more resilient.
History
Date User Action Args
2022-04-11 14:59:36adminsetgithub: 86134
2020-10-11 13:51:59epainesetmessages: + msg378435
2020-10-08 18:32:31terry.reedysetmessages: + msg378265
2020-10-08 17:27:32c.v.horiesetmessages: + msg378259
2020-10-08 16:34:52c.v.horiesetmessages: + msg378256
2020-10-08 00:07:11terry.reedysetstatus: open -> closed

type: enhancement
versions: + Python 3.10, - Python 3.9
messages: + msg378202
superseder: Add idlelib module entry to doc
resolution: duplicate
stage: resolved
2020-10-07 17:19:45epainesetnosy: + epaine
messages: + msg378173
2020-10-07 14:44:02xtreaksetnosy: + terry.reedy
components: + IDLE
2020-10-07 13:54:09c.v.horiecreate