Re: [Tutor] Checking the format of IP address...

2006-11-03 Thread Guillermo Fernandez Castellanos
Hi, I would probably take the string, separate the numbers and check they are acceptable: def correct_ip(ip): # Check if my IP address has 4 numbers separated by dots num=ip.split('.') if not len(num)==4: return False # Check each of the 4 numbers is between 0 and 255 for n

Re: [Tutor] Checking the format of IP address...

2006-11-03 Thread Asrarahmed Kadri
Sorry. I will try to first go to GOOGLE and if I cannot find there, then I'll post my query.   Thanks for all the support till now.     Regards, Asrarahmed  On 11/3/06, Kent Johnson <[EMAIL PROTECTED]> wrote: Asrarahmed Kadri wrote:>> Hi Folks,>> I want to implement a simple program that verifies t

Re: [Tutor] Checking the format of IP address...

2006-11-03 Thread Kent Johnson
Asrarahmed Kadri wrote: > > Hi Folks, > > I want to implement a simple program that verifies the IP provided by > the user is in the right format or not. > > How to go about it..? > Any suggestions.. How about googling 'python ip address'? You seem to come here first when you need to do som

[Tutor] Checking the format of IP address...

2006-11-03 Thread Asrarahmed Kadri
Hi Folks,   I want to implement a simple program that verifies the IP provided by the user is in the right format or not.   How to go about it..? Any suggestions..   TIA. Regards, Asrarahmed   -- To HIM you shall return. ___ Tutor maillist - Tutor@pyt