this version works in almost the same way as the http client version we wrote firstbut it builds and submits an internet url address to get its work done (the constructed url is printed as the script' first output lineas we saw in the ftp section of this the urllib request function urlopen returns file-like object from which we can read the remote data but because the constructed urls begin with "the urllib request module automatically employs the lower-level http interfaces to download the requested file instead of ftpc:\pp \internet\otherhttp-getfile-urllib py '\nb\nb'\nb"mark lutz' python training services\nb'<link rel="stylesheettype="text/csshref="_themes/blends/blen '\nc:\pp \internet\otherhttp-getfile-urllib py www python org /index '<!doctype html public "-// //dtd xhtml transitional//en" '\nb'\nb'<html xmlns=" '\nb'\nc:\pp \internet\otherhttp-getfile-urllib py www rmi net /~lutz '\nb'\nb'\nb"mark lutz' book support site\nb'\nb'\nc:\pp \internet\otherhttp-getfile-urllib py localhost /cgi-bin/languages py?language=java 'languages\nb'syntax\nb'java\nbsystem out println("hello world")\nb'\nb'\nas beforethe filename argument can name simple file or program invocation with optional parameters at the endas in the last run here if you read this output carefullyyou'll notice that this script still works if you leave the "index htmloff the end of site' root filename (in the third command line)unlike the raw http version of the preceding sectionthe url-based interface is smart enough to do the right thing client-side scripting