Re: [Tutor] Accessing methods in same class

2011-11-06 Thread Peter Lavelle
. Regards Peter Lavelle ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Good Book

2011-07-18 Thread Peter Lavelle
There's a free ebook aimed at beginners here:http://inventwithpython.com/ Regards Peter Lavelle On 18/07/11 09:26, Ryan wrote: Dear All Pythonist, I'm strarting learn python programming and I have been found many resources on it but I have a problem. I don't know, w

Re: [Tutor] sftp get single file

2011-06-22 Thread Peter Lavelle
You could use the subprocess module to run the relevant system commands. More info on running sftp non-interactively (i.e from a script) can be found here: http://fixunix.com/ssh/238284-non-interactive-sftp-put.html Regards Peter Lavelle ___ Tutor

Re: [Tutor] regex woes in finding an ip and GET string

2011-06-19 Thread Peter Lavelle
Looking at the regex you have to match an IP address, I think you would need to put a range limit on each of the four octets you are searching for (as each one would be between 1 and 3 digits long.) For example: r = re.match(r"\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b",line) has worked for me.

Re: [Tutor] Beginner puzzle with unpacking argv

2011-06-16 Thread Peter Lavelle
If you need to process command line arguments then the argparse module may also be useful to you. More info can be found here: http://docs.python.org/library/argparse.html Regards Peter Lavelle On 16/06/11 19:03, Steve Willoughby wrote: On 16-Jun-11 10:10, Lisi wrote: 1 from sys import

Re: [Tutor] checking if a variable is an integer?

2011-05-31 Thread Peter Lavelle
I think you could also use the type() function. See example below: if type(yourvar) == int: #Do stuff here if it is an integer else: #Do something here if it is not an integer Regards Peter On 31/05/11 22:23, Hans Barkei wrote: I want to make a program that finds all the prime numb