On Apr 15, 2007, at 7:57 PM, Michael Bentley wrote:

>      if net_location[0].lower() == 'www':
>          net_location = net_location[1:]

It is not guaranteed that the host name will be 'www' though, is it?

If you *really* want to strip the host portion of a domain name, I  
suppose you could make calls to whois until you get a match.  For  
instance, a whois lookup on www.cnn.com will not find a match while a  
lookup on cnn.com will.

hth,
Michael
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to