PyFoam.ThirdParty.six module

Utilities for writing code that runs on Python 2 and 3

class PyFoam.ThirdParty.six.Iterator[source]

Bases: object

__dict__ = dict_proxy({'__dict__': <attribute '__dict__' of 'Iterator' objects>, '__module__': 'PyFoam.ThirdParty.six', '__weakref__': <attribute '__weakref__' of 'Iterator' objects>, '__doc__': None, 'next': <function next>})
__module__ = 'PyFoam.ThirdParty.six'
__weakref__

list of weak references to the object (if defined)

next()[source]
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__ = []
__weakref__

list of weak references to the object (if defined)

error = <module 'PyFoam.ThirdParty.six.moves.urllib.error' (built-in)>
parse = <module 'PyFoam.ThirdParty.six.moves.urllib_parse' (built-in)>
request = <module 'PyFoam.ThirdParty.six.moves.urllib.request' (built-in)>
response = <module 'PyFoam.ThirdParty.six.moves.urllib.response' (built-in)>
robotparser = <module 'PyFoam.ThirdParty.six.moves.urllib.robotparser' (built-in)>
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
__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

ParseResult
SplitResult
__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>]
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
__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>]
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

__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>]
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
__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]

x.__init__(…) initializes x; see help(type(x)) for signature

__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]

x.__init__(…) initializes x; see help(type(x)) for signature

__module__ = 'PyFoam.ThirdParty.six'
_resolve()[source]
class PyFoam.ThirdParty.six._LazyDescr(name)[source]

Bases: object

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

x.__init__(…) initializes x; see help(type(x)) for signature

__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]

x.__init__(…) initializes x; see help(type(x)) for signature

__module__ = 'PyFoam.ThirdParty.six'
__weakref__

list of weak references to the object (if defined)

_moved_attributes = []
class PyFoam.ThirdParty.six._MovedItems(name)[source]

Bases: PyFoam.ThirdParty.six._LazyModule

Lazy loading of moved objects

BaseHTTPServer
CGIHTTPServer
SimpleHTTPServer
UserDict
UserList
UserString
__module__ = 'PyFoam.ThirdParty.six'
__path__ = []
_dummy_thread
_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.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>]
_thread
cStringIO
copyreg
dbm_gnu
email_mime_base
email_mime_multipart
email_mime_nonmultipart
email_mime_text
filter
filterfalse
getcwd
getcwdb
html_entities
html_parser
http_cookiejar
http_cookies
intern
map
queue
range
reduce
reload_module
reprlib
shlex_quote
socketserver
tkinter
tkinter_colorchooser
tkinter_commondialog
tkinter_constants
tkinter_dialog
tkinter_dnd
tkinter_filedialog
tkinter_font
tkinter_messagebox
tkinter_scrolledtext
tkinter_simpledialog
tkinter_tix
tkinter_tkfiledialog
tkinter_tksimpledialog
tkinter_ttk
urllib
urllib_error
urllib_parse
urllib_robotparser
xmlrpc_client
xmlrpc_server
xrange
zip
zip_longest
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__ = dict_proxy({'_add_module': <function _add_module>, '__module__': 'PyFoam.ThirdParty.six', '_get_module': <function _get_module>, '_SixMetaPathImporter__get_module': <function __get_module>, 'get_source': <function get_code>, 'find_module': <function find_module>, 'load_module': <function load_module>, '__dict__': <attribute '__dict__' of '_SixMetaPathImporter' objects>, 'is_package': <function is_package>, 'get_code': <function get_code>, '__weakref__': <attribute '__weakref__' of '_SixMetaPathImporter' objects>, '__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 ', '__init__': <function __init__>})
__init__(six_module_name)[source]

x.__init__(…) initializes x; see help(type(x)) for signature

__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.byte2int(bs)[source]
PyFoam.ThirdParty.six.create_bound_method(func, obj)[source]
PyFoam.ThirdParty.six.create_unbound_method(func, cls)[source]
PyFoam.ThirdParty.six.exec_(_code_, _globs_=None, _locs_=None)[source]

Execute code in a namespace.

PyFoam.ThirdParty.six.get_unbound_function(unbound)[source]

Get the function out of a possibly unbound function

PyFoam.ThirdParty.six.indexbytes(buf, i)[source]
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.print_(*args, **kwargs)[source]
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.

PyFoam.ThirdParty.six.wraps(wrapped, assigned=('__module__', '__name__', '__doc__'), updated=('__dict__', ))[source]