[Zope-CMF] Re: [OT] CVS, PythonScripts and Line Endings

Tres Seaver tseaver@palladion.com
Thu, 31 May 2001 07:56:02 -0400


Chris Withers wrote:

>>I've traced the problem to the fact that CMFCore.FSPythonMethod
>>instance open their files in binary mode.  Please create a tracker
>>issue on this bug:
>>
>>  http://www.zope.org/Products/PTK/Tracker
>>
>>so that I don't lose track of it.
>>
> 
> BTW, I think this problem might afflict normal Python Scripts too.
> 
> We have an HTTP testing harness that creates some Python Scripts via HTTP
> puts. The source for the scripts is stored on disk and checked into CVS.
> Whenever it's checked out on a windows box, the script creation fails with
> Python syntax errors indicating incorrect indentation.
> 
> We worked around this problem by checking the script source files in as
> binary, but I wonder if there isn't a better solution by modifying the
> PythonScript product somehow?


I just fixed the FSPythonScript module yesterday to deal with that
issue (opening the script file in 'rb' mode).  As for your problem with
creating PythonScripts via HTTP:  I can't reproduce this with either
cadaver or ncftp, although I explicitly forced carriage returns into
the test file.  You could probably fix the testing harness to open the
files in text mode, and the problem would go away, as well.


> PS: Is FSPythonScript in the CMF distribution now?


Yes, see:
   http://cvs.zope.org/CMF/CMFCore

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@digicool.com
Digital Creations     "Zope Dealers"       http://www.zope.org