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

3.9 IDLE documentation. #86134

Closed
cvhorie mannequin opened this issue Oct 7, 2020 · 7 comments
Closed

3.9 IDLE documentation. #86134

cvhorie mannequin opened this issue Oct 7, 2020 · 7 comments
Labels
3.10 docs Documentation in the Doc dir expert-IDLE type-feature A feature request or enhancement

Comments

@cvhorie
Copy link
Mannequin

cvhorie mannequin commented Oct 7, 2020

BPO 41968
Nosy @terryjreedy, @E-Paine
Superseder
  • bpo-31329: Add idlelib module entry to doc
  • 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 = None
    closed_at = <Date 2020-10-08.00:07:11.369>
    created_at = <Date 2020-10-07.13:54:09.349>
    labels = ['expert-IDLE', 'type-feature', '3.10', 'docs']
    title = '3.9 IDLE documentation.'
    updated_at = <Date 2020-10-11.13:51:59.311>
    user = 'https://bugs.python.org/cvhorie'

    bugs.python.org fields:

    activity = <Date 2020-10-11.13:51:59.311>
    actor = 'epaine'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2020-10-08.00:07:11.369>
    closer = 'terry.reedy'
    components = ['Documentation', 'IDLE']
    creation = <Date 2020-10-07.13:54:09.349>
    creator = 'c.v.horie'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 41968
    keywords = []
    message_count = 7.0
    messages = ['378161', '378173', '378202', '378256', '378259', '378265', '378435']
    nosy_count = 4.0
    nosy_names = ['terry.reedy', 'docs@python', 'epaine', 'c.v.horie']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '31329'
    type = 'enhancement'
    url = 'https://bugs.python.org/issue41968'
    versions = ['Python 3.10']

    @cvhorie
    Copy link
    Mannequin Author

    cvhorie mannequin commented Oct 7, 2020

    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.

    @cvhorie cvhorie mannequin added the 3.9 label Oct 7, 2020
    @cvhorie cvhorie mannequin assigned docspython Oct 7, 2020
    @cvhorie cvhorie mannequin added docs Documentation in the Doc dir 3.9 labels Oct 7, 2020
    @cvhorie cvhorie mannequin assigned docspython Oct 7, 2020
    @cvhorie cvhorie mannequin added the docs Documentation in the Doc dir label Oct 7, 2020
    @E-Paine
    Copy link
    Mannequin

    E-Paine mannequin commented Oct 7, 2020

    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.

    @terryjreedy
    Copy link
    Member

    terryjreedy commented Oct 8, 2020

    I agree that the doc needs more, but I am closing this as a duplicate of bpo-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.

    @terryjreedy terryjreedy added 3.10 and removed 3.9 labels Oct 8, 2020
    @terryjreedy terryjreedy added type-feature A feature request or enhancement 3.10 and removed 3.9 labels Oct 8, 2020
    @terryjreedy terryjreedy added the type-feature A feature request or enhancement label Oct 8, 2020
    @cvhorie
    Copy link
    Mannequin Author

    cvhorie mannequin commented Oct 8, 2020

    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
    bpo-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\>


    @cvhorie
    Copy link
    Mannequin Author

    cvhorie mannequin commented Oct 8, 2020

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


    @terryjreedy
    Copy link
    Member

    terryjreedy commented Oct 8, 2020

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

    @E-Paine
    Copy link
    Mannequin

    E-Paine mannequin commented Oct 11, 2020

    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.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.10 docs Documentation in the Doc dir expert-IDLE type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants