Orbits  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
Classes | Functions | Variables
pip._vendor.six Namespace Reference

Classes

class  X
 
class  _LazyDescr
 
class  MovedModule
 
class  _LazyModule
 
class  MovedAttribute
 
class  _MovedItems
 
class  Module_six_moves_urllib_parse
 
class  Module_six_moves_urllib_error
 
class  Module_six_moves_urllib_request
 
class  Module_six_moves_urllib_response
 
class  Module_six_moves_urllib_robotparser
 
class  Module_six_moves_urllib
 
class  Iterator
 

Functions

def _add_doc
 
def _import_module
 
def add_move
 
def remove_move
 
def advance_iterator
 
def callable
 
def get_unbound_function
 
def create_bound_method
 
def iterkeys
 
def itervalues
 
def iteritems
 
def iterlists
 
def b
 
def u
 
def int2byte
 
def byte2int
 
def indexbytes
 
def iterbytes
 
def reraise
 
def exec_
 
def print_
 
def with_metaclass
 
def add_metaclass
 

Variables

string __author__ = "Benjamin Peterson <benjamin@python.org>"
 
string __version__ = "1.6.1"
 
list PY2 = sys.version_info[0]
 
list PY3 = sys.version_info[0]
 
 string_types = str,
 
 integer_types = int,
 
 class_types = type,
 
 text_type = str
 
 binary_type = bytes
 
 MAXSIZE = sys.maxsize
 
list _moved_attributes
 
list moves = sys.modules[__name__ + ".moves"]
 
list _urllib_parse_moved_attributes
 
list _urllib_error_moved_attributes
 
list _urllib_request_moved_attributes
 
list _urllib_response_moved_attributes
 
list _urllib_robotparser_moved_attributes
 
string _meth_func = "__func__"
 
string _meth_self = "__self__"
 
string _func_closure = "__closure__"
 
string _func_code = "__code__"
 
string _func_defaults = "__defaults__"
 
string _func_globals = "__globals__"
 
string _iterkeys = "keys"
 
string _itervalues = "values"
 
string _iteritems = "items"
 
string _iterlists = "lists"
 
 advance_iterator = next
 
 next = advance_iterator
 
 callable = callable
 
 create_bound_method = types.MethodType
 
 Iterator = object
 
tuple get_method_function = operator.attrgetter(_meth_func)
 
tuple get_method_self = operator.attrgetter(_meth_self)
 
tuple get_function_closure = operator.attrgetter(_func_closure)
 
tuple get_function_code = operator.attrgetter(_func_code)
 
tuple get_function_defaults = operator.attrgetter(_func_defaults)
 
tuple get_function_globals = operator.attrgetter(_func_globals)
 
 unichr = chr
 
tuple int2byte = operator.methodcaller("to_bytes", 1, "big")
 
tuple byte2int = operator.itemgetter(0)
 
 indexbytes = operator.getitem
 
 iterbytes = iter
 
 StringIO = io.StringIO
 
 BytesIO = io.BytesIO
 
tuple exec_ = getattr(moves.builtins, "exec")
 
tuple print_ = getattr(moves.builtins, "print", None)
 

Detailed Description

Utilities for writing code that runs on Python 2 and 3

Function Documentation

def pip._vendor.six._add_doc (   func,
  doc 
)
private
Add documentation to a function.
def pip._vendor.six._import_module (   name)
private
Import module, returning the module after the last dot.
def pip._vendor.six.add_metaclass (   metaclass)
Class decorator for creating a class with a metaclass.
def pip._vendor.six.add_move (   move)
Add an item to six.moves.
def pip._vendor.six.advance_iterator (   it)
def pip._vendor.six.b (   s)
def pip._vendor.six.byte2int (   bs)
def pip._vendor.six.callable (   obj)
def pip._vendor.six.create_bound_method (   func,
  obj 
)
def pip._vendor.six.exec_ (   _code_,
  _globs_ = None,
  _locs_ = None 
)
Execute code in a namespace.
def pip._vendor.six.get_unbound_function (   unbound)
def pip._vendor.six.indexbytes (   buf,
  i 
)
def pip._vendor.six.int2byte (   i)
def pip._vendor.six.iterbytes (   buf)
def pip._vendor.six.iteritems (   d,
  kw 
)
Return an iterator over the (key, value) pairs of a dictionary.
def pip._vendor.six.iterkeys (   d,
  kw 
)
Return an iterator over the keys of a dictionary.
def pip._vendor.six.iterlists (   d,
  kw 
)
Return an iterator over the (key, [values]) pairs of a dictionary.
def pip._vendor.six.itervalues (   d,
  kw 
)
Return an iterator over the values of a dictionary.
def pip._vendor.six.print_ (   args,
  kwargs 
)
The new-style print function for Python 2.4 and 2.5.
def pip._vendor.six.remove_move (   name)
Remove item from six.moves.
def pip._vendor.six.reraise (   tp,
  value,
  tb = None 
)
def pip._vendor.six.u (   s)
def pip._vendor.six.with_metaclass (   meta,
  bases 
)
Create a base class with a metaclass.

Variable Documentation

string pip._vendor.six.__author__ = "Benjamin Peterson <benjamin@python.org>"
string pip._vendor.six.__version__ = "1.6.1"
string pip._vendor.six._func_closure = "__closure__"
string pip._vendor.six._func_code = "__code__"
string pip._vendor.six._func_defaults = "__defaults__"
string pip._vendor.six._func_globals = "__globals__"
string pip._vendor.six._iteritems = "items"
string pip._vendor.six._iterkeys = "keys"
string pip._vendor.six._iterlists = "lists"
string pip._vendor.six._itervalues = "values"
string pip._vendor.six._meth_func = "__func__"
string pip._vendor.six._meth_self = "__self__"
list pip._vendor.six._moved_attributes
list pip._vendor.six._urllib_error_moved_attributes
Initial value:
1 = [
2  MovedAttribute("URLError", "urllib2", "urllib.error"),
3  MovedAttribute("HTTPError", "urllib2", "urllib.error"),
4  MovedAttribute("ContentTooShortError", "urllib", "urllib.error"),
5 ]
list pip._vendor.six._urllib_parse_moved_attributes
Initial value:
1 = [
2  MovedAttribute("ParseResult", "urlparse", "urllib.parse"),
3  MovedAttribute("SplitResult", "urlparse", "urllib.parse"),
4  MovedAttribute("parse_qs", "urlparse", "urllib.parse"),
5  MovedAttribute("parse_qsl", "urlparse", "urllib.parse"),
6  MovedAttribute("urldefrag", "urlparse", "urllib.parse"),
7  MovedAttribute("urljoin", "urlparse", "urllib.parse"),
8  MovedAttribute("urlparse", "urlparse", "urllib.parse"),
9  MovedAttribute("urlsplit", "urlparse", "urllib.parse"),
10  MovedAttribute("urlunparse", "urlparse", "urllib.parse"),
11  MovedAttribute("urlunsplit", "urlparse", "urllib.parse"),
12  MovedAttribute("quote", "urllib", "urllib.parse"),
13  MovedAttribute("quote_plus", "urllib", "urllib.parse"),
14  MovedAttribute("unquote", "urllib", "urllib.parse"),
15  MovedAttribute("unquote_plus", "urllib", "urllib.parse"),
16  MovedAttribute("urlencode", "urllib", "urllib.parse"),
17  MovedAttribute("splitquery", "urllib", "urllib.parse"),
18 ]
list pip._vendor.six._urllib_request_moved_attributes
list pip._vendor.six._urllib_response_moved_attributes
Initial value:
1 = [
2  MovedAttribute("addbase", "urllib", "urllib.response"),
3  MovedAttribute("addclosehook", "urllib", "urllib.response"),
4  MovedAttribute("addinfo", "urllib", "urllib.response"),
5  MovedAttribute("addinfourl", "urllib", "urllib.response"),
6 ]
list pip._vendor.six._urllib_robotparser_moved_attributes
Initial value:
1 = [
2  MovedAttribute("RobotFileParser", "robotparser", "urllib.robotparser"),
3 ]
pip._vendor.six.advance_iterator = next
pip._vendor.six.binary_type = bytes
tuple pip._vendor.six.byte2int = operator.itemgetter(0)
pip._vendor.six.BytesIO = io.BytesIO
pip._vendor.six.callable = callable
tuple pip._vendor.six.class_types = type,
pip._vendor.six.create_bound_method = types.MethodType
tuple pip._vendor.six.exec_ = getattr(moves.builtins, "exec")
tuple pip._vendor.six.get_function_closure = operator.attrgetter(_func_closure)
tuple pip._vendor.six.get_function_code = operator.attrgetter(_func_code)
tuple pip._vendor.six.get_function_defaults = operator.attrgetter(_func_defaults)
tuple pip._vendor.six.get_function_globals = operator.attrgetter(_func_globals)
tuple pip._vendor.six.get_method_function = operator.attrgetter(_meth_func)
tuple pip._vendor.six.get_method_self = operator.attrgetter(_meth_self)
pip._vendor.six.indexbytes = operator.getitem
pip._vendor.six.int2byte = operator.methodcaller("to_bytes", 1, "big")
tuple pip._vendor.six.integer_types = int,
pip._vendor.six.iterbytes = iter
tuple pip._vendor.six.MAXSIZE = sys.maxsize
list pip._vendor.six.moves = sys.modules[__name__ + ".moves"]
pip._vendor.six.next = advance_iterator
tuple pip._vendor.six.print_ = getattr(moves.builtins, "print", None)
list pip._vendor.six.PY2 = sys.version_info[0]
list pip._vendor.six.PY3 = sys.version_info[0]
pip._vendor.six.string_types = str,
pip._vendor.six.StringIO = io.StringIO
pip._vendor.six.text_type = str
pip._vendor.six.unichr = chr

Copyright 2014 Google Inc. All rights reserved.