[Tutor] understanding urllib.urlopen

johnf jfabiani at yolo.com
Thu Apr 23 17:27:33 CEST 2009

I'm trying to comfirm an address is a good address via google.  Meaning does 
google report that the address exist.

If I do 
urllib.urlopen( "http://maps.google.com/maps/geo?%s" % params )
with the address in params.  I get the longitude and latitude correctly.

If I use the following in the address bar of a browser
 "http://maps.google.com?q='18 Tadlock Place Woodland CA'" 
all works.

But if I attempt this
urllib.urlopen( "http://maps.google.com?q='18 Tadlock Place Woodland CA'" )
it always fails. 

So I don't understand urllib.urlopen().  Could some kind soul explain what I'm 
doing wrong.
John Fabiani

More information about the Tutor mailing list