[Edu-sig] Re: CP4E (states cgi demo)
Nicola Larosa
nico at tekNico.net
Mon Apr 11 18:21:07 CEST 2005
> (2) because I'm playing around on a WinXP laptop and using PSFTP to copy
> files up to my ISP, I got bitten by the line-ending problem, i.e. Apache at
> the ISP dies if the line endings are \r\n instead of \n (locally,
> CGIHTTPServer didn't care). I fixed this by running Perl stuff like: perl
> -p -e 's/\r$//' < winfile.txt > unixfile.txt
You don't really need Perl nor sed for that. There's this little gem,
hidden in the sources of the Python interpreter:
http://cvs.sourceforge.net/viewcvs.py/python/python/dist/src/Tools/scripts/crlf.py?view=markup
I think that the Demo and the Tools directories should be included in all
binary distributions of the Python interpreter.
--
Nicola Larosa - nico at tekNico.net
Q: Should I dislike Python's significant whitespace?
A: No, you shouldn't. [...]
Q: But it's ugly and wrong.
A: No, it's not. It's beautiful and right.
-- Jarno Virtanen on his weblog, February 2005
More information about the Edu-sig
mailing list