pds4_tools.extern.six module¶
Utilities for writing code that runs on Python 2 and 3
- class MovedAttribute(name, old_mod, new_mod, old_attr=None, new_attr=None)[source]¶
Bases:
pds4_tools.extern.six._LazyDescr
- class Module_six_moves_urllib_parse(name)[source]¶
Bases:
pds4_tools.extern.six._LazyModule
Lazy loading of moved objects in six.moves.urllib_parse
- ParseResult¶
- SplitResult¶
- parse_qs¶
- parse_qsl¶
- quote¶
- quote_plus¶
- splitquery¶
- splittag¶
- splituser¶
- splitvalue¶
- unquote¶
- unquote_plus¶
- unquote_to_bytes¶
- urldefrag¶
- urlencode¶
- urljoin¶
- urlparse¶
- urlsplit¶
- urlunparse¶
- urlunsplit¶
- uses_fragment¶
- uses_netloc¶
- uses_params¶
- uses_query¶
- uses_relative¶
- class Module_six_moves_urllib_error(name)[source]¶
Bases:
pds4_tools.extern.six._LazyModule
Lazy loading of moved objects in six.moves.urllib_error
- ContentTooShortError¶
- HTTPError¶
- URLError¶
- class Module_six_moves_urllib_request(name)[source]¶
Bases:
pds4_tools.extern.six._LazyModule
Lazy loading of moved objects in six.moves.urllib_request
- AbstractBasicAuthHandler¶
- AbstractDigestAuthHandler¶
- BaseHandler¶
- CacheFTPHandler¶
- FTPHandler¶
- FancyURLopener¶
- FileHandler¶
- HTTPBasicAuthHandler¶
- HTTPCookieProcessor¶
- HTTPDefaultErrorHandler¶
- HTTPDigestAuthHandler¶
- HTTPErrorProcessor¶
- HTTPHandler¶
- HTTPPasswordMgr¶
- HTTPPasswordMgrWithDefaultRealm¶
- HTTPRedirectHandler¶
- HTTPSHandler¶
- OpenerDirector¶
- ProxyBasicAuthHandler¶
- ProxyDigestAuthHandler¶
- ProxyHandler¶
- Request¶
- URLopener¶
- UnknownHandler¶
- build_opener¶
- getproxies¶
- install_opener¶
- parse_http_list¶
- parse_keqv_list¶
- pathname2url¶
- proxy_bypass¶
- url2pathname¶
- urlcleanup¶
- urlopen¶
- urlretrieve¶
- class Module_six_moves_urllib_response(name)[source]¶
Bases:
pds4_tools.extern.six._LazyModule
Lazy loading of moved objects in six.moves.urllib_response
- addbase¶
- addclosehook¶
- addinfo¶
- addinfourl¶
- class Module_six_moves_urllib_robotparser(name)[source]¶
Bases:
pds4_tools.extern.six._LazyModule
Lazy loading of moved objects in six.moves.urllib_robotparser
- RobotFileParser¶
- class Module_six_moves_urllib[source]¶
Bases:
module
Create a six.moves.urllib namespace that resembles the Python 3 namespace
- parse = <module 'pds4_tools.extern.six.moves.urllib_parse'>¶
- error = <module 'pds4_tools.extern.six.moves.urllib.error'>¶
- request = <module 'pds4_tools.extern.six.moves.urllib.request'>¶
- response = <module 'pds4_tools.extern.six.moves.urllib.response'>¶
- robotparser = <module 'pds4_tools.extern.six.moves.urllib.robotparser'>¶
- int2byte()¶
S.pack(v1, v2, …) -> bytes
Return a bytes object containing values v1, v2, … packed according to the format string S.format. See help(struct) for more on format strings.
- ensure_binary(s, encoding='utf-8', errors='strict')[source]¶
Coerce s to six.binary_type.
- For Python 2:
unicode
-> encoded tostr
str
->str
- For Python 3:
str
-> encoded tobytes
bytes
->bytes
- ensure_str(s, encoding='utf-8', errors='strict')[source]¶
Coerce s to
str
.- For Python 2:
unicode
-> encoded tostr
str
->str
- For Python 3:
str
->str
bytes
-> decoded tostr