.
Regards
Peter Lavelle
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
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
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
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.
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
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