[Distutils] lineendings
M.-A. Lemburg
mal@lemburg.com
Tue Oct 15 16:01:41 2002
Robin Becker wrote:
> In article <3DAC69C3.10800@lemburg.com>, M.-A. Lemburg <mal@lemburg.com>
> writes
>
>>Robin Becker wrote:
>>
>>>Does distutils know or care about text file line endings? I ask only
>>>because I would like to be able to build pure python distros and have
>>>them work properly on multiple platforms.
>>
>>Why do you think you need support for line ends in distutils ?
>>For text data files, maybe ? (Python doesn't have a problem with
>>them for source code.)
>>
>
> well it certainly does in python-2.2.2 and there's pep 278 which seems
> to be concerned as well.
>
> Try entering
>
> import a, \
> b
>
> in mac format and then execute on a windows box. I see the following
>
>
> C:\>\tmp\ttt.py
> File "C:\tmp\ttt.py", line 1
> rlextrareportlab,\
> ^
> SyntaxError: invalid token
Interesting. That must be related to Macs only, though, because
I move around between Windows and Unix on a regular basis and
have so far never had any problem with line ends.
FWIW, Python 2.3 doesn't seem to have this problem anymore
and I remember that Jack worked on universal newline support
some months ago.
BTW, the ZIP utility has an option which takes care of text
files:
Zip 2.3 (November 29th 1999). Usage:
zip [-options] [-b path] [-t mmddyyyy] [-n suffixes] [zipfile list] [-xi list]
...
-0 store only -l convert LF to CR LF (-ll CR LF to LF)
Perhaps that's the way to go ?
--
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
_______________________________________________________________________
eGenix.com -- Makers of the Python mx Extensions: mxDateTime,mxODBC,...
Python Consulting: http://www.egenix.com/
Python Software: http://www.egenix.com/files/python/