PyFoam.ThirdParty.six module

Utilities for writing code that runs on Python 2 and 3

class PyFoam.ThirdParty.six.Module_six_moves_urllib[source]

Bases: module

Create a six.moves.urllib namespace that resembles the Python 3 namespace

error = <module 'PyFoam.ThirdParty.six.moves.urllib.error'>
parse = <module 'PyFoam.ThirdParty.six.moves.urllib_parse'>
request = <module 'PyFoam.ThirdParty.six.moves.urllib.request'>
response = <module 'PyFoam.ThirdParty.six.moves.urllib.response'>
robotparser = <module 'PyFoam.ThirdParty.six.moves.urllib.robotparser'>
class PyFoam.ThirdParty.six.Module_six_moves_urllib_error(name)[source]

Bases: PyFoam.ThirdParty.six._LazyModule

Lazy loading of moved objects in six.moves.urllib_error

ContentTooShortError
HTTPError
URLError
class PyFoam.ThirdParty.six.Module_six_moves_urllib_parse(name)[source]

Bases: PyFoam.ThirdParty.six._LazyModule

Lazy loading of moved objects in six.moves.urllib_parse

ParseResult
SplitResult
parse_qs
parse_qsl
quote
quote_plus
splitquery
splittag
splituser
unquote
unquote_plus
urldefrag
urlencode
urljoin
urlparse
urlsplit
urlunparse
urlunsplit
uses_fragment
uses_netloc
uses_params
uses_query
uses_relative
class PyFoam.ThirdParty.six.Module_six_moves_urllib_request(name)[source]

Bases: PyFoam.ThirdParty.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
pathname2url
proxy_bypass
url2pathname
urlcleanup
urlopen
urlretrieve
class PyFoam.ThirdParty.six.Module_six_moves_urllib_response(name)[source]

Bases: PyFoam.ThirdParty.six._LazyModule

Lazy loading of moved objects in six.moves.urllib_response

addbase
addclosehook
addinfo
addinfourl
class PyFoam.ThirdParty.six.Module_six_moves_urllib_robotparser(name)[source]

Bases: PyFoam.ThirdParty.six._LazyModule

Lazy loading of moved objects in six.moves.urllib_robotparser

RobotFileParser
class PyFoam.ThirdParty.six.MovedAttribute(name, old_mod, new_mod, old_attr=None, new_attr=None)[source]

Bases: PyFoam.ThirdParty.six._LazyDescr

class PyFoam.ThirdParty.six.MovedModule(name, old, new=None)[source]

Bases: PyFoam.ThirdParty.six._LazyDescr

PyFoam.ThirdParty.six.add_metaclass(metaclass)[source]

Class decorator for creating a class with a metaclass.

PyFoam.ThirdParty.six.add_move(move)[source]

Add an item to six.moves.

PyFoam.ThirdParty.six.assertCountEqual(self, *args, **kwargs)[source]
PyFoam.ThirdParty.six.assertRaisesRegex(self, *args, **kwargs)[source]
PyFoam.ThirdParty.six.assertRegex(self, *args, **kwargs)[source]
PyFoam.ThirdParty.six.b(s)[source]

Byte literal

PyFoam.ThirdParty.six.create_unbound_method(func, cls)[source]
PyFoam.ThirdParty.six.get_unbound_function(unbound)[source]

Get the function out of a possibly unbound function

PyFoam.ThirdParty.six.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.

PyFoam.ThirdParty.six.iteritems(d, **kw)[source]

Return an iterator over the (key, value) pairs of a dictionary.

PyFoam.ThirdParty.six.iterkeys(d, **kw)[source]

Return an iterator over the keys of a dictionary.

PyFoam.ThirdParty.six.iterlists(d, **kw)[source]

Return an iterator over the (key, [values]) pairs of a dictionary.

PyFoam.ThirdParty.six.itervalues(d, **kw)[source]

Return an iterator over the values of a dictionary.

PyFoam.ThirdParty.six.python_2_unicode_compatible(klass)[source]

A decorator that defines __unicode__ and __str__ methods under Python 2. Under Python 3 it does nothing.

To support Python 2 and 3 with a single code base, define a __str__ method returning text and apply this decorator to the class.

PyFoam.ThirdParty.six.raise_from(value, from_value)[source]
PyFoam.ThirdParty.six.remove_move(name)[source]

Remove item from six.moves.

PyFoam.ThirdParty.six.reraise(tp, value, tb=None)[source]

Reraise an exception.

PyFoam.ThirdParty.six.u(s)[source]

Text literal

PyFoam.ThirdParty.six.with_metaclass(meta, *bases)[source]

Create a base class with a metaclass.