[ python-Feature Requests-1004696 ] translate Windows cr-lf when
installing scripts on Linux
SourceForge.net
noreply at sourceforge.net
Wed Aug 11 06:47:04 CEST 2004
Feature Requests item #1004696, was opened at 2004-08-06 11:00
Message generated for change (Comment added) made by kbk
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1004696&group_id=5470
>Category: Python Interpreter Core
Group: None
>Status: Closed
>Resolution: Duplicate
Priority: 5
Submitted By: Tim Cera (timcera)
>Assigned to: Kurt B. Kaiser (kbk)
Summary: translate Windows cr-lf when installing scripts on Linux
Initial Comment:
PROBLEM
If a file installed as a script has Window cr-lf
endings, even if the '#!/usr/bin/env python' is
included to support direct execution on Linux, it
doesn't work because the shell is confused by the
cr-lf.
This problem has been addressed in the newsgroups,
with the usual solution to manually change the line
endings, or only develop with an editor that can
maintain Linux line endings.
SOLUTION
Convert line endings on installed scripts to the line
endings appropriate to the machine running the
installation. Could be limited to Unix/Linux
platform because Windows doesn't care about the line
endings.
kindest regards,
tim
----------------------------------------------------------------------
>Comment By: Kurt B. Kaiser (kbk)
Date: 2004-08-10 23:47
Message:
Logged In: YES
user_id=149084
"Universal New Lines"
See PEP 278, implemented at Python 2.3.
It is better not to automagically modify the script
when running it. However, there is a script
'crlf.py' in Tools/scripts which will convert
files with Windows line endings to Unix
line endings, if you wish to do that.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1004696&group_id=5470
More information about the Python-bugs-list
mailing list