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

__dir__()[source]
__module__ = 'PyFoam.ThirdParty.six'
__path__ = []
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

__module__ = 'PyFoam.ThirdParty.six'
_moved_attributes = [<PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>]
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

__module__ = 'PyFoam.ThirdParty.six'
_moved_attributes = [<PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>]
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

__module__ = 'PyFoam.ThirdParty.six'
_moved_attributes = [<PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>]
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

__module__ = 'PyFoam.ThirdParty.six'
_moved_attributes = [<PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>]
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

__module__ = 'PyFoam.ThirdParty.six'
_moved_attributes = [<PyFoam.ThirdParty.six.MovedAttribute object>]
class PyFoam.ThirdParty.six.MovedAttribute(name, old_mod, new_mod, old_attr=None, new_attr=None)[source]

Bases: PyFoam.ThirdParty.six._LazyDescr

__init__(name, old_mod, new_mod, old_attr=None, new_attr=None)[source]
__module__ = 'PyFoam.ThirdParty.six'
_resolve()[source]
class PyFoam.ThirdParty.six.MovedModule(name, old, new=None)[source]

Bases: PyFoam.ThirdParty.six._LazyDescr

__getattr__(attr)[source]
__init__(name, old, new=None)[source]
__module__ = 'PyFoam.ThirdParty.six'
_resolve()[source]
class PyFoam.ThirdParty.six._LazyDescr(name)[source]

Bases: object

__dict__ = mappingproxy({'__doc__': None, '__dict__': <attribute '__dict__' of '_LazyDescr' objects>, '__weakref__': <attribute '__weakref__' of '_LazyDescr' objects>, '__init__': <function _LazyDescr.__init__>, '__get__': <function _LazyDescr.__get__>, '__module__': 'PyFoam.ThirdParty.six'})
__get__(obj, tp)[source]
__init__(name)[source]
__module__ = 'PyFoam.ThirdParty.six'
__weakref__

list of weak references to the object (if defined)

class PyFoam.ThirdParty.six._LazyModule(name)[source]

Bases: module

__dir__()[source]
__init__(name)[source]
__module__ = 'PyFoam.ThirdParty.six'
_moved_attributes = []
class PyFoam.ThirdParty.six._MovedItems(name)[source]

Bases: PyFoam.ThirdParty.six._LazyModule

Lazy loading of moved objects

__module__ = 'PyFoam.ThirdParty.six'
__path__ = []
_moved_attributes = [<PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedAttribute object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>, <PyFoam.ThirdParty.six.MovedModule object>]
class PyFoam.ThirdParty.six._SixMetaPathImporter(six_module_name)[source]

Bases: object

A meta path importer to import six.moves and its submodules.

This class implements a PEP302 finder and loader. It should be compatible with Python 2.5 and all existing versions of Python3

_SixMetaPathImporter__get_module(fullname)
__dict__ = mappingproxy({'_add_module': <function _SixMetaPathImporter._add_module>, 'is_package': <function _SixMetaPathImporter.is_package>, '__dict__': <attribute '__dict__' of '_SixMetaPathImporter' objects>, '_get_module': <function _SixMetaPathImporter._get_module>, '_SixMetaPathImporter__get_module': <function _SixMetaPathImporter.__get_module>, 'find_module': <function _SixMetaPathImporter.find_module>, 'get_code': <function _SixMetaPathImporter.get_code>, '__init__': <function _SixMetaPathImporter.__init__>, 'get_source': <function _SixMetaPathImporter.get_code>, '__doc__': '\n A meta path importer to import six.moves and its submodules.\n\n This class implements a PEP302 finder and loader. It should be compatible\n with Python 2.5 and all existing versions of Python3\n ', 'load_module': <function _SixMetaPathImporter.load_module>, '__weakref__': <attribute '__weakref__' of '_SixMetaPathImporter' objects>, '__module__': 'PyFoam.ThirdParty.six'})
__init__(six_module_name)[source]
__module__ = 'PyFoam.ThirdParty.six'
__weakref__

list of weak references to the object (if defined)

_add_module(mod, *fullnames)[source]
_get_module(fullname)[source]
find_module(fullname, path=None)[source]
get_code(fullname)[source]

Return None

Required, if is_package is implemented

get_source(fullname)

Return None

Required, if is_package is implemented

is_package(fullname)[source]

Return true, if the named module is a package.

We need this method to get correct spec objects with Python 3.4 (see PEP451)

load_module(fullname)[source]
PyFoam.ThirdParty.six._add_doc(func, doc)[source]

Add documentation to a function.

PyFoam.ThirdParty.six._import_module(name)[source]

Import module, returning the module after the last dot.

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.get_unbound_function(unbound)[source]

Get the function out of a possibly unbound function

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.