1 message in org.python.python-bugs-list[ python-Bugs-700055 ] site.py should...
FromSent OnAttachments
SourceForge.netMar 20, 2004 4:28 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[ python-Bugs-700055 ] site.py should ignore trailing CRs in .pth filesActions...
From:SourceForge.net (nore@sourceforge.net)
Date:Mar 20, 2004 4:28:35 pm
List:org.python.python-bugs-list

Bugs item #700055, was opened at 2003-03-08 11:39 Message generated for change (Comment added) made by bcannon You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=700055&group_id=5470

Category: Python Library Group: Python 2.2.2

Status: Closed Resolution: Fixed

Priority: 5 Submitted By: Dan Everhart (d_everhart) Assigned to: Nobody/Anonymous (nobody) Summary: site.py should ignore trailing CRs in .pth files

Initial Comment: When site.addpackage(), running on a posix (e.g. cygwin or linux) system, reads lines from a .pth file that have '\r\n' line terminators, the carriage return character interferes with both the import operation and the directory appending operation.

The situation can arise, for example, when .pth files reside on a network directory that is shared between Windows and Posix installations and accessed by python interpreters running in both environments.

Suggested change: replace site.py line 146: dir = f.readline() with dir = f.readline().rstrip() This change also eliminates the need for removing the newline at lines 154-155

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

Comment By: Brett Cannon (bcannon)

Date: 2004-03-20 13:28

Message: Logged In: YES user_id=357491

Fixed Lib/site.py as rev. 1.58 in Python 2.4 and rev. 1.53.6.5 in Python 2.3 .

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

Comment By: Brett Cannon (bcannon) Date: 2003-06-08 14:26

Message: Logged In: YES user_id=357491

Would opening the file with universal newlines solve the issue?

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