six - pydoc - phpman

Look up a command

 

Markdown Format | JSON API | MCP Server Tool


six
NAME PACKAGE CONTENTS SUBMODULES CLASSES FUNCTIONS DATA VERSION AUTHOR FILE
Help on package six:

NAME
    six - Utilities for writing code that runs on Python 2 and 3

PACKAGE CONTENTS


SUBMODULES
    moves

CLASSES
    builtins.module(builtins.object)
        Module_six_moves_urllib
    _LazyDescr(builtins.object)
        MovedAttribute
        MovedModule
    _LazyModule(builtins.module)
        Module_six_moves_urllib_error
        Module_six_moves_urllib_parse
        Module_six_moves_urllib_request
        Module_six_moves_urllib_response
        Module_six_moves_urllib_robotparser

    class Module_six_moves_urllib(builtins.module)
     |  Module_six_moves_urllib(name, doc=None)
     |
     |  Create a six.moves.urllib namespace that resembles the Python 3 namespace
     |
     |  Method resolution order:
     |      Module_six_moves_urllib
     |      builtins.module
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  __dir__(self)
     |      __dir__() -> list
     |      specialized dir() implementation
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |
     |  __annotations__ = {}
     |
     |  error = <module 'six.moves.urllib.error'>
     |
     |  parse = <module 'six.moves.urllib_parse'>
     |
     |  request = <module 'six.moves.urllib.request'>
     |
     |  response = <module 'six.moves.urllib.response'>
     |
     |  robotparser = <module 'six.moves.urllib.robotparser'>
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from builtins.module:
     |
     |  __delattr__(self, name, /)
     |      Implement delattr(self, name).
     |
     |  __getattribute__(self, name, /)
     |      Return getattr(self, name).
     |
     |  __init__(self, /, *args, **kwargs)
     |      Initialize self.  See help(type(self)) for accurate signature.
     |
     |  __repr__(self, /)
     |      Return repr(self).
     |
     |  __setattr__(self, name, value, /)
     |      Implement setattr(self, name, value).
     |
     |  ----------------------------------------------------------------------
     |  Static methods inherited from builtins.module:
     |
     |  __new__(*args, **kwargs) from builtins.type
     |      Create and return a new object.  See help(type) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from builtins.module:
     |
     |  __dict__

    class Module_six_moves_urllib_error(_LazyModule)
     |  Module_six_moves_urllib_error(name)
     |
     |  Lazy loading of moved objects in six.moves.urllib_error
     |
     |  Method resolution order:
     |      Module_six_moves_urllib_error
     |      _LazyModule
     |      builtins.module
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  ContentTooShortError
     |
     |  HTTPError
     |
     |  URLError
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |
     |  __annotations__ = {}
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from _LazyModule:
     |
     |  __dir__(self)
     |      __dir__() -> list
     |      specialized dir() implementation
     |
     |  __init__(self, name)
     |      Initialize self.  See help(type(self)) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from builtins.module:
     |
     |  __delattr__(self, name, /)
     |      Implement delattr(self, name).
     |
     |  __getattribute__(self, name, /)
     |      Return getattr(self, name).
     |
     |  __repr__(self, /)
     |      Return repr(self).
     |
     |  __setattr__(self, name, value, /)
     |      Implement setattr(self, name, value).
     |
     |  ----------------------------------------------------------------------
     |  Static methods inherited from builtins.module:
     |
     |  __new__(*args, **kwargs) from builtins.type
     |      Create and return a new object.  See help(type) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from builtins.module:
     |
     |  __dict__

    class Module_six_moves_urllib_parse(_LazyModule)
     |  Module_six_moves_urllib_parse(name)
     |
     |  Lazy loading of moved objects in six.moves.urllib_parse
     |
     |  Method resolution order:
     |      Module_six_moves_urllib_parse
     |      _LazyModule
     |      builtins.module
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  ParseResult
     |
     |  SplitResult
     |
     |  parse_qs
     |
     |  parse_qsl
     |
     |  quote
     |
     |  quote_plus
     |
     |  splitquery
     |
     |  splittag
     |
     |  splituser
     |
     |  splitvalue
     |
     |  unquote
     |
     |  unquote_plus
     |
     |  unquote_to_bytes
     |
     |  urldefrag
     |
     |  urlencode
     |
     |  urljoin
     |
     |  urlparse
     |
     |  urlsplit
     |
     |  urlunparse
     |
     |  urlunsplit
     |
     |  uses_fragment
     |
     |  uses_netloc
     |
     |  uses_params
     |
     |  uses_query
     |
     |  uses_relative
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |
     |  __annotations__ = {}
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from _LazyModule:
     |
     |  __dir__(self)
     |      __dir__() -> list
     |      specialized dir() implementation
     |
     |  __init__(self, name)
     |      Initialize self.  See help(type(self)) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from builtins.module:
     |
     |  __delattr__(self, name, /)
     |      Implement delattr(self, name).
     |
     |  __getattribute__(self, name, /)
     |      Return getattr(self, name).
     |
     |  __repr__(self, /)
     |      Return repr(self).
     |
     |  __setattr__(self, name, value, /)
     |      Implement setattr(self, name, value).
     |
     |  ----------------------------------------------------------------------
     |  Static methods inherited from builtins.module:
     |
     |  __new__(*args, **kwargs) from builtins.type
     |      Create and return a new object.  See help(type) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from builtins.module:
     |
     |  __dict__

    class Module_six_moves_urllib_request(_LazyModule)
     |  Module_six_moves_urllib_request(name)
     |
     |  Lazy loading of moved objects in six.moves.urllib_request
     |
     |  Method resolution order:
     |      Module_six_moves_urllib_request
     |      _LazyModule
     |      builtins.module
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  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
     |
     |  parse_http_list
     |
     |  parse_keqv_list
     |
     |  pathname2url
     |
     |  proxy_bypass
     |
     |  url2pathname
     |
     |  urlcleanup
     |
     |  urlopen
     |
     |  urlretrieve
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |
     |  __annotations__ = {}
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from _LazyModule:
     |
     |  __dir__(self)
     |      __dir__() -> list
     |      specialized dir() implementation
     |
     |  __init__(self, name)
     |      Initialize self.  See help(type(self)) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from builtins.module:
     |
     |  __delattr__(self, name, /)
     |      Implement delattr(self, name).
     |
     |  __getattribute__(self, name, /)
     |      Return getattr(self, name).
     |
     |  __repr__(self, /)
     |      Return repr(self).
     |
     |  __setattr__(self, name, value, /)
     |      Implement setattr(self, name, value).
     |
     |  ----------------------------------------------------------------------
     |  Static methods inherited from builtins.module:
     |
     |  __new__(*args, **kwargs) from builtins.type
     |      Create and return a new object.  See help(type) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from builtins.module:
     |
     |  __dict__

    class Module_six_moves_urllib_response(_LazyModule)
     |  Module_six_moves_urllib_response(name)
     |
     |  Lazy loading of moved objects in six.moves.urllib_response
     |
     |  Method resolution order:
     |      Module_six_moves_urllib_response
     |      _LazyModule
     |      builtins.module
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  addbase
     |
     |  addclosehook
     |
     |  addinfo
     |
     |  addinfourl
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |
     |  __annotations__ = {}
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from _LazyModule:
     |
     |  __dir__(self)
     |      __dir__() -> list
     |      specialized dir() implementation
     |
     |  __init__(self, name)
     |      Initialize self.  See help(type(self)) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from builtins.module:
     |
     |  __delattr__(self, name, /)
     |      Implement delattr(self, name).
     |
     |  __getattribute__(self, name, /)
     |      Return getattr(self, name).
     |
     |  __repr__(self, /)
     |      Return repr(self).
     |
     |  __setattr__(self, name, value, /)
     |      Implement setattr(self, name, value).
     |
     |  ----------------------------------------------------------------------
     |  Static methods inherited from builtins.module:
     |
     |  __new__(*args, **kwargs) from builtins.type
     |      Create and return a new object.  See help(type) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from builtins.module:
     |
     |  __dict__

    class Module_six_moves_urllib_robotparser(_LazyModule)
     |  Module_six_moves_urllib_robotparser(name)
     |
     |  Lazy loading of moved objects in six.moves.urllib_robotparser
     |
     |  Method resolution order:
     |      Module_six_moves_urllib_robotparser
     |      _LazyModule
     |      builtins.module
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  RobotFileParser
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |
     |  __annotations__ = {}
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from _LazyModule:
     |
     |  __dir__(self)
     |      __dir__() -> list
     |      specialized dir() implementation
     |
     |  __init__(self, name)
     |      Initialize self.  See help(type(self)) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from builtins.module:
     |
     |  __delattr__(self, name, /)
     |      Implement delattr(self, name).
     |
     |  __getattribute__(self, name, /)
     |      Return getattr(self, name).
     |
     |  __repr__(self, /)
     |      Return repr(self).
     |
     |  __setattr__(self, name, value, /)
     |      Implement setattr(self, name, value).
     |
     |  ----------------------------------------------------------------------
     |  Static methods inherited from builtins.module:
     |
     |  __new__(*args, **kwargs) from builtins.type
     |      Create and return a new object.  See help(type) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from builtins.module:
     |
     |  __dict__

    class MovedAttribute(_LazyDescr)
     |  MovedAttribute(name, old_mod, new_mod, old_attr=None, new_attr=None)
     |
     |  Method resolution order:
     |      MovedAttribute
     |      _LazyDescr
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  __init__(self, name, old_mod, new_mod, old_attr=None, new_attr=None)
     |      Initialize self.  See help(type(self)) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from _LazyDescr:
     |
     |  __get__(self, obj, tp)
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from _LazyDescr:
     |
     |  __dict__
     |      dictionary for instance variables (if defined)
     |
     |  __weakref__
     |      list of weak references to the object (if defined)

    class MovedModule(_LazyDescr)
     |  MovedModule(name, old, new=None)
     |
     |  Method resolution order:
     |      MovedModule
     |      _LazyDescr
     |      builtins.object
     |
     |  Methods defined here:
     |
     |  __getattr__(self, attr)
     |
     |  __init__(self, name, old, new=None)
     |      Initialize self.  See help(type(self)) for accurate signature.
     |
     |  ----------------------------------------------------------------------
     |  Methods inherited from _LazyDescr:
     |
     |  __get__(self, obj, tp)
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors inherited from _LazyDescr:
     |
     |  __dict__
     |      dictionary for instance variables (if defined)
     |
     |  __weakref__
     |      list of weak references to the object (if defined)

FUNCTIONS
    add_metaclass(metaclass)
        Class decorator for creating a class with a metaclass.

    add_move(move)
        Add an item to six.moves.

    advance_iterator = next(...)
        next(iterator[, default])

        Return the next item from the iterator. If default is given and the iterator
        is exhausted, it is returned instead of raising StopIteration.

    assertCountEqual(self, *args, **kwargs)

    assertNotRegex(self, *args, **kwargs)

    assertRaisesRegex(self, *args, **kwargs)

    assertRegex(self, *args, **kwargs)

    b(s)
        Byte literal

    callable(obj, /)
        Return whether the object is callable (i.e., some kind of function).

        Note that classes are callable, as are instances of classes with a
        __call__() method.

    create_unbound_method(func, cls)

    ensure_binary(s, encoding='utf-8', errors='strict')
        Coerce **s** to six.binary_type.

        For Python 2:
          - `unicode` -> encoded to `str`
          - `str` -> `str`

        For Python 3:
          - `str` -> encoded to `bytes`
          - `bytes` -> `bytes`

    ensure_str(s, encoding='utf-8', errors='strict')
        Coerce *s* to `str`.

        For Python 2:
          - `unicode` -> encoded to `str`
          - `str` -> `str`

        For Python 3:
          - `str` -> `str`
          - `bytes` -> decoded to `str`

    ensure_text(s, encoding='utf-8', errors='strict')
        Coerce *s* to six.text_type.

        For Python 2:
          - `unicode` -> `unicode`
          - `str` -> `unicode`

        For Python 3:
          - `str` -> `str`
          - `bytes` -> decoded to `str`

    exec_ = exec(source, globals=None, locals=None, /)
        Execute the given source in the context of globals and locals.

        The source may be a string representing one or more Python statements
        or a code object as returned by compile().
        The globals must be a dictionary and locals can be any mapping,
        defaulting to the current globals and locals.
        If only globals is given, locals defaults to it.

    get_unbound_function(unbound)
        Get the function out of a possibly unbound function

    indexbytes = getitem(a, b, /)
        Same as a[b].

    int2byte = pack(...) method of _struct.Struct instance
        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.

    iterbytes = iter(...)
        iter(iterable) -> iterator
        iter(callable, sentinel) -> iterator

        Get an iterator from an object.  In the first form, the argument must
        supply its own iterator, or be a sequence.
        In the second form, the callable is called until it returns the sentinel.

    iteritems(d, **kw)
        Return an iterator over the (key, value) pairs of a dictionary.

    iterkeys(d, **kw)
        Return an iterator over the keys of a dictionary.

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

    itervalues(d, **kw)
        Return an iterator over the values of a dictionary.

    next(...)
        next(iterator[, default])

        Return the next item from the iterator. If default is given and the iterator
        is exhausted, it is returned instead of raising StopIteration.

    print_ = print(...)
        print(value, ..., sep=' ', end='\n', file=sys.stdout, flush=False)

        Prints the values to a stream, or to sys.stdout by default.
        Optional keyword arguments:
        file:  a file-like object (stream); defaults to the current sys.stdout.
        sep:   string inserted between values, default a space.
        end:   string appended after the last value, default a newline.
        flush: whether to forcibly flush the stream.

    python_2_unicode_compatible(klass)
        A class 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.

    raise_from(value, from_value)

    remove_move(name)
        Remove item from six.moves.

    reraise(tp, value, tb=None)
        Reraise an exception.

    u(s)
        Text literal

    unichr = chr(i, /)
        Return a Unicode string of one character with ordinal i; 0 <= i <= 0x10ffff.

    with_metaclass(meta, *bases)
        Create a base class with a metaclass.

DATA
    MAXSIZE = 9223372036854775807
    PY2 = False
    PY3 = True
    PY34 = True
    absolute_import = _Feature((2, 5, 0, 'alpha', 1), (3, 0, 0, 'alpha', 0...
    byte2int = operator.itemgetter(0)
    class_types = (<class 'type'>,)
    get_function_closure = operator.attrgetter('__closure__')
    get_function_code = operator.attrgetter('__code__')
    get_function_defaults = operator.attrgetter('__defaults__')
    get_function_globals = operator.attrgetter('__globals__')
    get_method_function = operator.attrgetter('__func__')
    get_method_self = operator.attrgetter('__self__')
    integer_types = (<class 'int'>,)
    string_types = (<class 'str'>,)
    viewitems = operator.methodcaller('items')
    viewkeys = operator.methodcaller('keys')
    viewvalues = operator.methodcaller('values')

VERSION
    1.16.0

AUTHOR
    Benjamin Peterson <benjamin AT python.org>

FILE
    /usr/lib/python3/dist-packages/six.py



Generated by phpMan Author: Che Dong Under GNU General Public License
2026-06-02 05:14 @216.73.216.198 CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 TransitionalValid CSS!

^_back to top