Re: [Tutor] problems with the shebang line and linux

2006-02-17 Thread Alan Gauld
> Try this with the file > > vi filename > escape > :%s/^M// > Or just run the dos2unix command that comes with most Linux distros... Or even use Python to write a script to strip() each line and write it back with a \n... In fact there's a prewritten script called crlf.py in the Tools folder

Re: [Tutor] problems with the shebang line and linux

2006-02-17 Thread Brian van den Broek
Thanks to all for the replies. Indeed, it must have been the DOS vs. Unix line terminators as several people suggested. A couple of comments in-line below. Roel Schroeven said unto the world upon 16/02/06 11:14 AM: >>On 16/02/06, *Brian van den Broek* <[EMAIL PROTECTED] >>

Re: [Tutor] problems with the shebang line and linux

2006-02-17 Thread Roel Schroeven
Adam schreef: > > > On 16/02/06, *Brian van den Broek* <[EMAIL PROTECTED] > > wrote: > > [EMAIL PROTECTED]:~$ which python > /usr/bin/python > [EMAIL PROTECTED]:~$ cd /media/windata/ > [EMAIL PROTECTED]:/media/windata$ ./testerlyfoo.py > Working! >

Re: [Tutor] problems with the shebang line and linux

2006-02-17 Thread Adam
On 16/02/06, David Rock <[EMAIL PROTECTED]> wrote: * Adam <[EMAIL PROTECTED]> [2006-02-16 14:23]:> On 16/02/06, Brian van den Broek <[EMAIL PROTECTED]> wrote: >> 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 e

Re: [Tutor] problems with the shebang line and linux

2006-02-16 Thread Nick Lunt
; To: Brian van den Broek; Tutor > Subject: Re: [Tutor] problems with the shebang line and linux > > > Hi Brian, > > it's the ^M characters that are catching you out here. > > Often files from a windows PC will have ^M as the newline char when viewed > in linux/unix

Re: [Tutor] problems with the shebang line and linux

2006-02-16 Thread Nick Lunt
36 > To: Tutor > Subject: [Tutor] problems with the shebang line and linux > > > 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 com

Re: [Tutor] problems with the shebang line and linux

2006-02-16 Thread Python
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 wi

Re: [Tutor] problems with the shebang line and linux

2006-02-16 Thread Tiago Saboga
Em Qui 16 Fev 2006 12:23, Adam escreveu: > > [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

Re: [Tutor] problems with the shebang line and linux

2006-02-16 Thread David Rock
* Adam <[EMAIL PROTECTED]> [2006-02-16 14:23]: > On 16/02/06, Brian van den Broek <[EMAIL PROTECTED]> wrote: > > 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

Re: [Tutor] problems with the shebang line and linux

2006-02-16 Thread Brian van den Broek
[EMAIL PROTECTED] said unto the world upon 16/02/06 08:22 AM: >>>bash: ./testerlybar.py: /usr/bin/python^M: bad interpreter: No such > > file or directory [EMAIL PROTECTED]:/media/windata$ > > Note the ^M the additional fileformat character inserted. That is > causing the problem. > > Instead o

Re: [Tutor] problems with the shebang line and linux

2006-02-16 Thread Senthil_OR
ursday, February 16, 2006 7:06 PM To: Tutor Subject: [Tutor] problems with the shebang line and linux 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 li

Re: [Tutor] problems with the shebang line and linux

2006-02-16 Thread Adam
On 16/02/06, Brian van den Broek <[EMAIL PROTECTED]> wrote: Hi all,I've switched to Linux fairly recently and am still at the fumblingabout stage :-)  I'm having a devil of a time with the shebang lineand running a py file from a command line.I wrote the following little test script with IDLE 1.1.

[Tutor] problems with the shebang line and linux

2006-02-16 Thread Brian van den Broek
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. I wrote the following little test script with IDLE 1.1.2 under Python 2.4.2 on Ubuntu 5.10: #!/usr/bin/py