/external/python/cpython2/Lib/test/ |
D | test_urllib2_localnet.py | 4 import urllib2 303 ah = urllib2.HTTPBasicAuthHandler() 305 urllib2.install_opener(urllib2.build_opener(ah)) 307 self.assertTrue(urllib2.urlopen(self.server_url)) 308 except urllib2.HTTPError: 314 ah = urllib2.HTTPBasicAuthHandler() 317 urllib2.install_opener(urllib2.build_opener(ah)) 318 self.assertRaises(urllib2.HTTPError, urllib2.urlopen, self.server_url) 350 handler = urllib2.ProxyHandler({"http" : proxy_url}) 351 self.proxy_digest_handler = urllib2.ProxyDigestAuthHandler() [all …]
|
D | test_urllib2.py | 9 import urllib2 10 from urllib2 import Request, OpenerDirector, AbstractDigestAuthHandler 27 self.assertRaises(ValueError, urllib2.urlopen, 'bogus url') 30 fname = os.path.abspath(urllib2.__file__).replace(os.sep, '/') 44 f = urllib2.urlopen(file_url) 55 self.assertEqual(urllib2.parse_http_list(string), list) 61 urllib2.urlopen( 362 raise urllib2.URLError("blah") 411 class MockHTTPHandler(urllib2.BaseHandler): 437 class MockHTTPSHandler(urllib2.AbstractHTTPHandler): [all …]
|
D | test_urllib2net.py | 6 import urllib2 30 _urlopen_with_retry = _wrap_with_retry_thrice(urllib2.urlopen, urllib2.URLError) 107 None, urllib2.URLError), 119 ('file:///nonsensename/etc/passwd', None, urllib2.URLError), 125 self.assertRaises(ValueError, urllib2.urlopen,'./relative_path/to/file') 158 req = urllib2.Request(urlwith_frag) 159 res = urllib2.urlopen(req) 164 req = urllib2.Request("http://www.example.com") 165 opener = urllib2.build_opener() 177 opener = urllib2.build_opener() [all …]
|
/external/python/cpython2/Doc/howto/ |
D | urllib2.rst | 4 HOWTO Fetch Internet Resources Using urllib2 12 HOWTO, available at `urllib2 - Le Manuel manquant 29 **urllib2** is a Python module for fetching URLs 36 urllib2 supports fetching URLs for many "URL schemes" (identified by the string 45 not intended to be easy to read. This HOWTO aims to illustrate using *urllib2*, 47 the :mod:`urllib2` docs, but is supplementary to them. 53 The simplest way to use urllib2 is as follows:: 55 import urllib2 56 response = urllib2.urlopen('http://python.org/') 59 Many uses of urllib2 will be that simple (note that instead of an 'http:' URL we [all …]
|
/external/autotest/site_utils/ |
D | hwid_lib.py | 7 import urllib2 67 'hwid': urllib2.quote(hwid), 111 'hwid': urllib2.quote(hwid), 130 page_contents = urllib2.urlopen(url_request) 131 except (urllib2.URLError, urllib2.HTTPError) as e:
|
/external/boringssl/src/util/bot/ |
D | update_clang.py | 16 import urllib2 48 response = urllib2.urlopen(url) 63 raise urllib2.URLError("only got %d of %d bytes" % 67 except urllib2.URLError as e: 70 if num_retries == 0 or isinstance(e, urllib2.HTTPError) and e.code == 404: 153 except urllib2.URLError:
|
/external/python/cpython2/Lib/distutils/command/ |
D | register.py | 10 import urllib2 89 response = urllib2.urlopen(self.repository+'?:action=list_classifiers') 163 auth = urllib2.HTTPPasswordMgr() 292 req = urllib2.Request(self.repository, body, headers) 295 opener = urllib2.build_opener( 296 urllib2.HTTPBasicAuthHandler(password_mgr=auth) 301 except urllib2.HTTPError, e: 305 except urllib2.URLError, e:
|
/external/grpc-grpc/tools/run_tests/python_utils/ |
D | comment_on_pr.py | 17 import urllib2 27 req = urllib2.Request( 37 print urllib2.urlopen(req).read()
|
/external/jacoco/.travis/ |
D | trigger-site-deployment.py | 2 import urllib2 6 req = urllib2.Request(url, data) 13 p = urllib2.urlopen(req)
|
/external/libiio/src/CI/travis/ |
D | jobs_running_cnt.py | 5 import urllib2 27 req = urllib2.Request("{0}/build/{1}/jobs".format(url, build_id), 30 response = urllib2.urlopen(req).read()
|
/external/autotest/tko/ |
D | jsonp_fetcher.cgi | 3 import cgi, traceback, urllib2 26 file_contents = urllib2.urlopen('http://localhost' + path).read() 28 except urllib2.HTTPError:
|
/external/autotest/client/common_lib/cros/ |
D | chromedriver.py | 8 import urllib2 94 urllib2.urlopen('http://localhost:%i/json/new' % 218 urllib2.urlopen(self.url + '/status') 220 except urllib2.URLError as e: 240 urllib2.urlopen(self.url + '/shutdown', timeout=10).close()
|
/external/grpc-grpc-java/buildscripts/ |
D | set_github_status.py | 19 import urllib2 49 req = urllib2.Request( 60 print urllib2.urlopen(req).read()
|
/external/autotest/client/cros/enterprise/ |
D | enterprise_fake_dmserver.py | 7 import urllib2 64 if urllib2.urlopen('%stest/ping' % self.server_url).getcode() == 200: 65 urllib2.urlopen('%sconfiguration/test/exit' % self.server_url)
|
/external/python/oauth2client/scripts/ |
D | fetch_gae_sdk.py | 16 import urllib2 26 version_info_json = urllib2.urlopen(_SDK_URL).read() 68 sdk_contents = StringIO.StringIO(urllib2.urlopen(sdk_url).read())
|
/external/python/six/documentation/ |
D | index.rst | 523 The :mod:`py2:urllib`, :mod:`py2:urllib2`, and :mod:`py2:urlparse` modules have 734 …:synopsis: Stuff from :mod:`py2:urllib` and :mod:`py2:urllib2` in Python 2 and :mod:`py3:urllib.er… 742 and :mod:`py2:urllib2`: 744 * :exc:`py2:urllib2.URLError` 745 * :exc:`py2:urllib2.HTTPError` 752 …:synopsis: Stuff from :mod:`py2:urllib` and :mod:`py2:urllib2` in Python 2 and :mod:`py3:urllib.re… 767 and :mod:`py2:urllib2`: 769 * :func:`py2:urllib2.urlopen` 770 * :func:`py2:urllib2.install_opener` 771 * :func:`py2:urllib2.build_opener` [all …]
|
/external/skia/tools/skqp/ |
D | find_commit_with_best_gold_results.py | 13 import urllib2 59 return urllib2.urlopen(urllib2.Request(url, headers={'Cookie': cookie})) 70 except urllib2.URLError:
|
/external/python/pyasn1-modules/tools/ |
D | ocspclient.py | 12 import urllib2 15 import urllib.request as urllib2 namespace 154 httpReq = urllib2.Request( 159 httpRsp = urllib2.urlopen(httpReq).read()
|
/external/autotest/frontend/afe/json_rpc/ |
D | proxy.py | 26 import urllib2 158 request = urllib2.Request(url_with_args, data=postdata, headers=headers) 162 return urllib2.urlopen(request).read() 164 return urllib2.urlopen(
|
/external/autotest/tko/perf_upload/ |
D | perf_uploader.py | 21 import urllib2 320 req = urllib2.Request(_DASHBOARD_UPLOAD_URL, encoded) 323 urllib2.urlopen(req) 324 except urllib2.HTTPError as e: 327 except urllib2.URLError as e:
|
/external/brotli/scripts/dictionary/ |
D | step-01-download-rfc.py | 6 import urllib2 8 response = urllib2.urlopen('https://tools.ietf.org/rfc/rfc7932.txt')
|
/external/pdfium/ |
D | update_pdfium.py | 3 import urllib2 46 chromiumVersions = urllib2.urlopen(CHROMIUM_VERSION_TRACKING_URL) 62 deps = urllib2.urlopen("%s/%s/%s" % (CHROMIUM_SOURCE_URL, getStableChromiumVersion(),
|
/external/python/cpython2/Tools/scripts/ |
D | checkpip.py | 8 import urllib2 16 data = json.loads(urllib2.urlopen(
|
/external/skia/tools/ |
D | retrieve_from_googlesource.py | 15 import urllib2 29 with closing(urllib2.urlopen(base64_url)) as f:
|
/external/skqp/tools/ |
D | retrieve_from_googlesource.py | 15 import urllib2 29 with closing(urllib2.urlopen(base64_url)) as f:
|