[Python-bugs-list] [ python-Bugs-700055 ] site.py should ignore trailing CRs in .pth files
SourceForge.net
noreply@sourceforge.net
Sun, 08 Jun 2003 14:26:09 -0700
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: Open
Resolution: None
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: 2003-06-08 14:26
Message:
Logged In: YES
user_id=357491
Would opening the file with universal newlines solve the issue?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=700055&group_id=5470