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

C. Porter Bassett porter at et.byu.edu
Sun Feb 11 01:29:41 EST 2001


I have noticed the same thing.  One easy work-around is to run 
"python start.py" instead of "./start.py".  It appears that it is bash
that has problems with the \r\n, not python.

--------------------------------------------------------------------------
C. Porter Bassett     porter at et.byu.edu   http://www.et.byu.edu/~porter
--------------------------------------------------------------------------
"Pretend like this is a really witty saying." - Anonymous
--------------------------------------------------------------------------

On Sat, 10 Feb 2001, Mike Carifio wrote:

> I have a network of Linux and Windows machines. On a Windows box, I have
> several python scripts which I'd also like to run on the Linux machines.
> I've
> smbmounted the Windows share to see the scripts, but having been created
> on the Windows box, the line termination in those files is \r\n. When I try
> to execute the script, say 'start', I get:
> 
> bash: ./start.py: No such file or directory
> 
> When I "clean up" start.py with tr - tr -d '\r' < start.py > reallystart.py,
> it
> runs. So it seems like python 2 can't compensate for wierd Windows line
> terminators. Any workarounds, other than 'tr'? Pl. advise. Tx.
> 
> 
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 





More information about the Python-list mailing list