getting host and path from url

Steve Young drevil_53711 at yahoo.com
Fri Dec 9 19:40:25 CET 2005


Hi, this is probably an easy question but is there a way to get the host and path seperatly out of an url? 
  
  Example:
  
  url = http://news.yahoo.com/fc/world/iraq
  
  and i want some way of getting:
  
  host = http://news.yahoo.com
  and
  path = /fc/world/iraq
  
  thanks.
  
  -Steve
   
  

			
---------------------------------
Yahoo! Shopping
 Find Great Deals on Holiday Gifts at Yahoo! Shopping 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20051209/4e845f3c/attachment.html>


More information about the Python-list mailing list