Re: Validating string for FDQN

2011-06-07 Thread Nobody
On Tue, 07 Jun 2011 15:52:05 +1000, Chris Angelico wrote: >> [1] If a hostname ends with a dot, it's fully qualified. > > Outside of BIND files, when do you ever see a name that actually ends > with a dot? Whenever it is entered that way. This may be necessary on complex networks with local sub

Re: Validating string for FDQN

2011-06-06 Thread Chris Torek
>On Tue, Jun 7, 2011 at 3:23 PM, Nobody wrote: >> [1] If a hostname ends with a dot, it's fully qualified. [otherwise not, so you have to use the resolver] In article , Chris Angelico wrote: >Outside of BIND files, when do you ever see a name that actually ends >with a dot? I type them in this

Re: Validating string for FDQN

2011-06-06 Thread Chris Angelico
On Tue, Jun 7, 2011 at 3:23 PM, Nobody wrote: > [1] If a hostname ends with a dot, it's fully qualified. > Outside of BIND files, when do you ever see a name that actually ends with a dot? ChrisA -- http://mail.python.org/mailman/listinfo/python-list

Re: Validating string for FDQN

2011-06-06 Thread Nobody
On Mon, 06 Jun 2011 17:40:29 -0700, Eric wrote: > Is there a library or regex that can determine if a string is a fqdn > (fully qualified domain name)? I'm writing a script that needs to add > a defined domain to the end of a hostname if it isn't already a fqdn > and doesn't contain the defined do

Re: Validating string for FDQN

2011-06-06 Thread Philip Semanchuk
On Jun 6, 2011, at 8:40 PM, Eric wrote: > Hello, > > Is there a library or regex that can determine if a string is a fqdn > (fully qualified domain name)? I'm writing a script that needs to add > a defined domain to the end of a hostname if it isn't already a fqdn > and doesn't contain the defin

Re: Validating string for FDQN

2011-06-06 Thread Chris Angelico
On Tue, Jun 7, 2011 at 10:40 AM, Eric wrote: > Hello, > > Is there a library or regex that can determine if a string is a fqdn > (fully qualified domain name)? I'm writing a script that needs to add > a defined domain to the end of a hostname if it isn't already a fqdn > and doesn't contain the de

Re: Validating string for FDQN

2011-06-06 Thread harrismh777
Eric wrote: Is there a library or regex that can determine if a string is a fqdn (fully qualified domain name)? I'm writing a script that needs to add a defined domain to the end of a hostname if it isn't already a fqdn and doesn't contain the defined domain. You might try the os module and the