First program

Phil Hansen phil at gmail.co.za
Tue Jun 15 06:17:12 EDT 2010


On Tue, 15 Jun 2010 04:53:52 -0300, Gabriel Genellina wrote:
> Looks like you created helloworld.py on Windows, or using
> Windows-oriented tools (perhaps a samba drive? ftp from a Windows disk?)
> Windows text files end each line with the \r\n sequence (CR LF, bytes
> 0x0D 0x0A, ^M^J). Unix (and Linux) uses only a \n (LF, 0x0A). The \r
> will be read as part of the previous line then.
> 
> There are tools to convert back and forth those formats (dos2unix and
> unix2dos, or the crlf.py demo script in the Python source distribution).
> But to avoid problems, it's better to use the right tools for the OS
> you're working with (that is, don't use notepad to edit Linux files...)

Thanks.
See replies above. Used Gedit and ubuntu but saved in wrong format (there 
is a choice and I didn't know better).





More information about the Python-list mailing list