internet application programming the following example shows how to use thisproxy proxyhandler({'http''auth httpbasicauthhandler(auth add_password("realm","host""username""password"opener build_opener(proxyauthu opener open("urllib response this is an internal module that implements the file-like objects returned by functions in the urllib request module there is no public api urllib parse the urllib parse module is used to manipulate url strings such as "url parsing (urlparse module in python the general form of url is "scheme://netlocpath;parameters?query#fragmentin additionthe netloc part of url may include port number such as "hostname:portor user authentication information such as "user:pass@hostnamethe following function is used to parse urlurlparse(urlstring [default_scheme [allow_fragments]]parses the url in urlstring and returns parseresult instance default_scheme specifies the scheme ("http""ftp"and so onto be used if none is present in the url if allow_fragments is zerofragment identifiers are not allowed parseresult instance is named tuple the form (schemenetlocpathparametersqueryfragmenthoweverthe following read-only attributes are also definedattribute description scheme netloc path params query fragment username url scheme specifier (for example'http'netloc specifier (for example'www python org'hierarchical path (for example'/index html'parameters for the last path element query string (for example'name=dave&id= 'fragment identifier without the leading '#username component if the netloc specifier is of the form 'username:password@hostnamepassword component from the netloc specifier host name component from the netloc specifier port number from the netloc specifier if it is of the form 'hostname:portr password hostname port parseresult instance can be turned back into url string using geturl( lib fl ff