[Patches] [ python-Patches-1196895 ] in IDLE, assume new text files are python source by default

SourceForge.net noreply at sourceforge.net
Fri Jun 10 18:02:35 CEST 2005


Patches item #1196895, was opened at 2005-05-07 06:25
Message generated for change (Comment added) made by mdehoon
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1196895&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: IDLE
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jeff Shute (jshute)
Assigned to: Nobody/Anonymous (nobody)
Summary: in IDLE, assume new text files are python source by default

Initial Comment:
This changes IDLE so that when you use File->New
Window, it assumes that the file will be python source
by default, so syntax highlighting will be enabled. 
Currently, when you make a new window, it assumes that
it is not python source by default, so you do not get
syntax highlighting until you save the file with
extension .py.

I believe this was the original intent of the code,
based on the test for a missing filename, but it got
broken at some point when the code was modified to
accept a path instead of a missing filename.

----------------------------------------------------------------------

Comment By: Michiel de Hoon (mdehoon)
Date: 2005-06-11 01:02

Message:
Logged In: YES 
user_id=488897

I've tested this patch on Windows.
Without the patch, as soon as the file is saved as
something.py, syntax highlighting is turned on. Before
saving, no syntax highlighting is used.
With the patch, the file is assumed to contain Python code,
and syntax highlighting is turned on immediately.
Unfortunately, if the user is creating a generic text file
(so not containing Python code), syntax highlighting is
turned on even if  the user saves the file as something.txt.
For a correct patch, syntax highlighting should be turned
off again if the user decides to save the file as a *.txt.

----------------------------------------------------------------------

Comment By: Tim Peters (tim_one)
Date: 2005-05-07 07:21

Message:
Logged In: YES 
user_id=31435

I haven't looked at the patch, but +1 on the idea.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1196895&group_id=5470


More information about the Patches mailing list