[ python-Bugs-1263656 ] IDLE on Mac

SourceForge.net noreply at sourceforge.net
Fri Aug 19 04:35:17 CEST 2005


Bugs item #1263656, was opened at 2005-08-18 22:35
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1263656&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: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: Bruce Sherwood (bsherwood)
Assigned to: Nobody/Anonymous (nobody)
Summary: IDLE on Mac

Initial Comment:
Copying code from some browsers into IDLE on the Mac
can leave the file with only \r (13) at the ends of
lines (Safari doesn't seem to have this problem). Then
checksyntax() in ScriptBinding.py fails to convert
these into \n (10), and compile() fails. The effect is
that a program which Python is willing to run gets a
syntax error in IDLE. I think the fix is in
checksyntax() to add after

source = re.sub(r"\r\n", "\n", source)

the following statement, which converts unaccompanied
\r's into \n's::

source = re.sub(r"\r", "\n", source)

I've tried this and it works, but someone with a better
overview of end-of-line issues in Python should think
through whether this is the appropriate fix.

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

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


More information about the Python-bugs-list mailing list