Test if path is a net location. Tests the scheme and netloc.
(self, path)
| 297 | return names |
| 298 | |
| 299 | def _isurl(self, path): |
| 300 | """Test if path is a net location. Tests the scheme and netloc.""" |
| 301 | |
| 302 | # We do this here to reduce the 'import numpy' initial import time. |
| 303 | from urllib.parse import urlparse |
| 304 | |
| 305 | # BUG : URLs require a scheme string ('http://') to be used. |
| 306 | # www.google.com will fail. |
| 307 | # Should we prepend the scheme for those that don't have it and |
| 308 | # test that also? Similar to the way we append .gz and test for |
| 309 | # for compressed versions of files. |
| 310 | |
| 311 | scheme, netloc, upath, uparams, uquery, ufrag = urlparse(path) |
| 312 | return bool(scheme and netloc) |
| 313 | |
| 314 | def _cache(self, path): |
| 315 | """Cache the file specified by path. |