Re: [Tutor] G'day

2006-02-16 Thread John Fouhy
On 16/02/06, John Connors <[EMAIL PROTECTED]> wrote: > My 1st dumb question: I have a copy of Teach Yourself Python in 24 Hours, > printed in 2000 so I guess it's virtually usless but i was hoping to learn > some of the basics from it. There is a small bit of code near the > beginning... Check out

Re: [Tutor] python mechanize examples

2006-02-16 Thread Danny Yoo
> Yeah that's the module I'm talking about. I installed it and trying to > get it to work using the docs, but it would be good to see some actual > working examples. Hi Ron, I haven't played around with mechanize, but according to: http://wwwsearch.sourceforge.net/mechanize/#tests worki

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

2006-02-16 Thread Nick Lunt
Take no notice of this, others have already answered. My emails to the tutor list seem to take about 5 hours to get thru for some reason. Nick . > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Behalf Of Nick Lunt > Sent: 16 February 2006 14:27 > To: Brian van d

Re: [Tutor] python mechanize examples

2006-02-16 Thread Kent Johnson
Ron Nixon wrote: > Anyone have or know where I can find working examples of python's > mechanize modules. Try to reverse engineer a script to see how it works. There are a few examples on the mechanize home page and in the source download (not in the egg). There is quite a bit of help in the do

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

2006-02-16 Thread Nick Lunt
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. On linux you should be able to check if a file has ^M in by running either 'vi -b filename' or 'sed -n l filename'. Try this with the file

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
>> 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 of copying and pasting try to use cp file1 file2. Else, open the copied file a

[Tutor] python mechanize examples

2006-02-16 Thread Ron Nixon
Anyone have or know where I can find working examples of python's mechanize modules. Try to reverse engineer a script to see how it works. Ron Yahoo! Autos. Looking for a sweet ride? Get pricing, reviews, & more on new and used cars.___ Tutor

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