Fredrik Lundh wrote:
> Sbaush wrote:
>
> > My app has in input an ip address in IPv4 notation.
> > is there a function that control if input is a string in IPv4 notation?
>
> here's one way to do it:
Here's a function from the 'validate' module that comes with ConfigObj
:
def dottedQuadToNum(ip)
thanks!! your ipcheck is perfect fo me!!2006/2/3, Fredrik Lundh <[EMAIL PROTECTED]>:
Sbaush wrote:> My app has in input an ip address in IPv4 notation.> is there a function that control if input is a string in IPv4 notation?here's one way to do it:def ipcheck(s):try:
a, b, c, d = [chr(i