[Tutor] problems with the shebang line and linux

Python python at venix.com
Thu Feb 16 16:43:24 CET 2006


On Thu, 2006-02-16 at 07:36 -0600, Brian van den Broek wrote:
> Hi all,
> 
> I've switched to Linux fairly recently and am still at the fumbling 
> about stage :-)  I'm having a devil of a time with the shebang line 
> and running a py file from a command line.
> 
The file has dos/windows format with CR/LF markers to separate lines.  A
normal posix file should only use LF.

dos2unix is a handy utility for converting text files.  Depending on
your distribution, you should be able to install it using apt or yum
	e.g. yum install dos2unix
or use the GUI interface to your package manager (yumex is the yum GUI,
I do not remember the name of the apt GUI).

On a shared partition, keeping .py files in a posix format (LF only) has
never caused any problems for me.  The Python compiler/interpreter on
Windows will happily process either format.

-- 
Lloyd Kvam
Venix Corp



More information about the Tutor mailing list