poco.utils.six module

Utilities for writing code that runs on Python 2 and 3

class Module_six_moves_urllib[source]

Bases: module

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

class Module_six_moves_urllib_error(name)[source]

Bases: _LazyModule

Lazy loading of moved objects in six.moves.urllib_error

class Module_six_moves_urllib_parse(name)[source]

Bases: _LazyModule

Lazy loading of moved objects in six.moves.urllib_parse

class Module_six_moves_urllib_request(name)[source]

Bases: _LazyModule

Lazy loading of moved objects in six.moves.urllib_request

class Module_six_moves_urllib_response(name)[source]

Bases: _LazyModule

Lazy loading of moved objects in six.moves.urllib_response

class Module_six_moves_urllib_robotparser(name)[source]

Bases: _LazyModule

Lazy loading of moved objects in six.moves.urllib_robotparser

add_metaclass(metaclass)[source]

Class decorator for creating a class with a metaclass.

add_move(move)[source]

Add an item to six.moves.

b(s)[source]

Byte literal

get_unbound_function(unbound)[source]

Get the function out of a possibly unbound function

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.

iteritems(d, **kw)[source]

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

iterkeys(d, **kw)[source]

Return an iterator over the keys of a dictionary.

iterlists(d, **kw)[source]

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

itervalues(d, **kw)[source]

Return an iterator over the values of a dictionary.

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.

remove_move(name)[source]

Remove item from six.moves.

reraise(tp, value, tb=None)[source]

Reraise an exception.

u(s)[source]

Text literal

with_metaclass(meta, *bases)[source]

Create a base class with a metaclass.