python 2.0 won't run scripts with \r\n line termination on RH7?

Steve Purcell stephen_purcell at yahoo.com
Tue Feb 13 15:59:47 CET 2001


Cesar Rabak wrote:
> 
> So elaborating, on your reasoning, Steve, I think the 'sollution' would
> be the OP to have a kind of "header" or macro in his favorite editor
> which inserts the correct line in whatever OS be the script being
> written.

Perhaps, although what's the simplest thing? Save the file in UNIX text
format (there must be Windows editors that support this).

As Toby Dickenson suggests, you can use a technique like CVS' filters to
transparently correct line endings according to the system on which files are
checked out from source code control. In this case, files are usually saved
in UNIX format in the source repository, and Windowsified as necessary on
checkout.

I think there's a utility that ships with Python for changing the #! line of
a number of scripts -- perhaps that would help. Anybody remember the name?

-Steve

-- 
Steve Purcell, Pythangelist
http://pyunit.sourceforge.net/
http://pyserv.sourceforge.net/
Available for consulting and training.
"Even snakes are afraid of snakes." -- Steven Wright




More information about the Python-list mailing list