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: IDLE: make .py default added extension on save
Type: enhancement Stage: needs patch
Components: Documentation, IDLE Versions: Python 3.2, Python 3.3, Python 2.7
process
Status: closed Resolution: duplicate
Dependencies: Superseder: IDLE does not supply a default ext of .py on Windows or OS X for new file saves
View: 4832
Assigned To: terry.reedy Nosy List: Ariel, Kaleb702, Typo, cvrebert, roger.serwy, terry.reedy
Priority: normal Keywords:

Created on 2010-11-08 17:58 by Typo, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (11)
msg120785 - (view) Author: Typo (Typo) Date: 2010-11-08 17:58
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?
msg120789 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2010-11-08 18:42
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.
msg120792 - (view) Author: Typo (Typo) Date: 2010-11-08 18:58
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.
msg120797 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2010-11-08 19:32
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.
msg120805 - (view) Author: Typo (Typo) Date: 2010-11-08 21:41
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.
msg120811 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2010-11-08 22:02
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.
msg121042 - (view) Author: Typo (Typo) Date: 2010-11-12 16:04
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 >.<
msg121045 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2010-11-12 16:47
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.
msg146312 - (view) Author: Ariel (Ariel) Date: 2011-10-24 18:00
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?
msg146325 - (view) Author: Terry J. Reedy (terry.reedy) * (Python committer) Date: 2011-10-24 21:35
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.)
msg149125 - (view) Author: Roger Serwy (roger.serwy) * (Python committer) Date: 2011-12-09 21:19
This is a duplicate of #4832.
History
Date User Action Args
2022-04-11 14:57:08adminsetgithub: 54573
2020-06-08 00:29:28terry.reedyunlinkissue13504 dependencies
2011-12-10 03:52:09terry.reedysetstatus: open -> closed
resolution: duplicate
superseder: IDLE does not supply a default ext of .py on Windows or OS X for new file saves
2011-12-09 21:19:38roger.serwysetnosy: + roger.serwy
messages: + msg149125
2011-12-01 00:38:48cvrebertsetnosy: + cvrebert
2011-11-30 09:11:10ned.deilylinkissue13504 dependencies
2011-11-06 02:45:43ned.deilysetnosy: + Kaleb702
2011-11-06 02:45:27ned.deilylinkissue13347 superseder
2011-10-24 21:35:01terry.reedysettype: enhancement
title: Color coding fails after running program. -> IDLE: make .py default added extension on save
messages: + msg146325
versions: + Python 3.3, - Python 3.1
2011-10-24 18:00:42Arielsetnosy: + Ariel
messages: + msg146312
2010-11-12 16:47:03terry.reedysetnosy: terry.reedy, Typo
messages: + msg121045

assignee: terry.reedy
components: + Documentation, - None
stage: needs patch
2010-11-12 16:04:22Typosetmessages: + msg121042
2010-11-08 22:02:46terry.reedysetnosy: terry.reedy, Typo
messages: + msg120811
components: + IDLE
versions: + Python 2.7, Python 3.2
2010-11-08 21:41:38Typosetmessages: + msg120805
2010-11-08 19:32:32terry.reedysetmessages: + msg120797
2010-11-08 18:58:27Typosetmessages: + msg120792
2010-11-08 18:42:39terry.reedysettype: performance -> (no value)

messages: + msg120789
nosy: + terry.reedy
2010-11-08 17:58:06Typocreate