Adam schreef:
> 
> 
> On 16/02/06, *Brian van den Broek* <[EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>> wrote:
> 
>     [EMAIL PROTECTED]:~$ which python
>     /usr/bin/python
>     [EMAIL PROTECTED]:~$ cd /media/windata/
>     [EMAIL PROTECTED]:/media/windata$ ./testerlyfoo.py
>     Working!
>     [EMAIL PROTECTED] :/media/windata$ ./testerlybar.py
>     bash: ./testerlybar.py: /usr/bin/python^M: bad interpreter: No such
>     file or directory
> 
> 
> It seems to me that that ^M is your problem although I'm not quite sure 
> where it came from there seems to be an extra character on the end of 
> the copied one. Here's a little test I did:

That ^M looks familiar to me: normally it means that the file is in 
DOS/Windows format instead of UNIX format, i.e. with CR/LF at the end of 
each line instead of only CR. Converting the file with dos2unix or a 
similar utility should solve the problem in that case.

I guess it's there because the file comes from a FAT32 file system, and 
I presume it has mount options that make the filesystem translate the 
line endings automatically (though I don't know if such an option even 
exists).

Strange thing is that the problem persists after retyping the file, but 
I guess that's because the editor was still in CR/LF mode. Did you 
create a new file before starting to retype, or did you just clear 
everything?

-- 
If I have been able to see further, it was only because I stood
on the shoulders of giants.  -- Isaac Newton

Roel Schroeven

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to