Skip to content

IDLE: make .py default added extension on save #54573

Closed

Description

@Typo
mannequin
BPO 10364
Nosy @terryjreedy, @serwy
Superseder
  • bpo-4832: IDLE does not supply a default ext of .py on Windows or OS X for new file saves
  • 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 2011-12-10.03:52:09.744>
    created_at = <Date 2010-11-08.17:58:06.890>
    labels = ['expert-IDLE', 'type-feature', 'docs']
    title = 'IDLE: make .py default added extension on save'
    updated_at = <Date 2011-12-10.03:52:09.744>
    user = 'https://bugs.python.org/Typo'

    bugs.python.org fields:

    activity = <Date 2011-12-10.03:52:09.744>
    actor = 'terry.reedy'
    assignee = 'terry.reedy'
    closed = True
    closed_date = <Date 2011-12-10.03:52:09.744>
    closer = 'terry.reedy'
    components = ['Documentation', 'IDLE']
    creation = <Date 2010-11-08.17:58:06.890>
    creator = 'Typo'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 10364
    keywords = []
    message_count = 11.0
    messages = ['120785', '120789', '120792', '120797', '120805', '120811', '121042', '121045', '146312', '146325', '149125']
    nosy_count = 6.0
    nosy_names = ['terry.reedy', 'roger.serwy', 'cvrebert', 'Typo', 'Ariel', 'Kaleb702']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'needs patch'
    status = 'closed'
    superseder = '4832'
    type = 'enhancement'
    url = 'https://bugs.python.org/issue10364'
    versions = ['Python 2.7', 'Python 3.2', 'Python 3.3']

    Activity

    1. Typo commented on Nov 8, 2010

      Typomannequin
      MannequinAuthor

      Whenever I run a program in Python 3.1.2 (windows), the color coding disappears. print() is no longer purple, def is no longer orange, etc. It all turns black, and there doesn't seem to be a way to repair this. I've installed and uninstalled Python 3.1.2 several times and it's done nothing. Loading previous programs also causes this. Only if I am making a new program is the coding separated by color. Can anyone help?

    2. terryjreedy commented on Nov 8, 2010

      @terryjreedy
      Member

      This is an editor rather than Python problem. Are you using the IDLE editor or something else. Which version of Windows?

      Orange and purple are IDLE's default for keywords and built-in names. But running 3.1.2 under XP, I have no problem as you describe, either after running or loading.

    3. Typo commented on Nov 8, 2010

      Typomannequin
      MannequinAuthor

      I am using Windows Vista. The problem is not within Idle but within the screen where you create and save coding to use in Idle.

    4. terryjreedy commented on Nov 8, 2010

      @terryjreedy
      Member

      If it is an editor window that you launch from IDLE, with a red script Tk in the upper left corner, with 'About IDLE' on the help menu, then it is an IDLE editor window and part of IDLE -- and appropriate for bug reports here ;-).

      This could be something specific to Vista; I do not know how well interactive things are tested there.

    5. Typo commented on Nov 8, 2010

      Typomannequin
      MannequinAuthor

      Ah I see. I didn't know that the editor window was part of Idle. Sorry for the confusion.

      I am also receiving this problem in Python 2.5.1.

    6. terryjreedy commented on Nov 8, 2010

      @terryjreedy
      Member

      I take that as a yes, IDLE edit window. 2.5 is beyond fixing at this point, but that is useful data. I will look out for this problem when I load Python on Win7.

    7. Typo commented on Nov 12, 2010

      Typomannequin
      MannequinAuthor

      Hey, I found out what the problem was. I wasn't saving the files as a .py file. As soon as I did that the color came back. Sorry to have wasted your time >.<

    8. terryjreedy commented on Nov 12, 2010

      @terryjreedy
      Member

      Thank you for reporting back. This could be closed as invalid, but since I think this is something I should have known or guessed, I will leave it open for now as a reminder to look at the docs sometime and see if anything should be added somewhere.

    9. self-assigned this
      on Nov 12, 2010
    10. Ariel commented on Oct 24, 2011

      Arielmannequin
      Mannequin

      Excuse me for budging in, I was having the same problem (both python 3.2 and 2.7, on both win XP and 7) without knowing the file extention is the cause.

      Why doesn't IDLE editor save files with the .py extention unless specificly ordered to? The Save as dialoge window has a "type" drop-down menue. Maybe I'm missing some of the logic behind it?

    11. terryjreedy commented on Oct 24, 2011

      @terryjreedy
      Member

      I am guessing that because the extension could be either .py or .pyw, the initial save does not add either but forces the user to type one or the other. I find this annoying too, so I am thinking about separating the choices and see if .py, .pyw, and maybe .txt can be automatically added if not written, while avoiding '.py.py', etc. Hence the change of issue title and type. (Note to self: make sure this is not a duplicate.)

    12. changed the title [-]Color coding fails after running program.[/-] [+]IDLE: make .py default added extension on save[/+] on Oct 24, 2011
    13. serwy commented on Dec 9, 2011

      serwymannequin
      Mannequin

      This is a duplicate of bpo-4832.

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

    docsDocumentation in the Doc dirtopic-IDLEtype-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions