Module Expr Str TryExcept body Import alias handlers ExceptHandler type NameLoad body Assign NameStore NameLoad ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body TryExcept body Assign NameStore Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Return Call NameLoad NameLoad Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body If AttributeLoad NameLoad attr body Raise Call NameLoad Str Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body If AttributeLoad NameLoad attr body Raise Call NameLoad Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num body If AttributeLoad NameLoad attr body Raise Call NameLoad Str Raise Call NameLoad Num Str decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body If AttributeLoad NameLoad attr body Raise Call NameLoad Str Raise Call NameLoad Num Str decorator_list FunctionDef arguments args NameParam NameParam defaults body If AttributeLoad NameLoad attr body Raise Call NameLoad Str Raise Call NameLoad Num Str decorator_list FunctionDef arguments args NameParam NameParam defaults body If AttributeLoad NameLoad attr body Raise Call NameLoad Str Raise Call NameLoad Num Str decorator_list FunctionDef arguments args NameParam NameParam defaults Num body If AttributeLoad NameLoad attr body Raise Call NameLoad Str Raise Call NameLoad Num Str decorator_list FunctionDef arguments args NameParam NameParam defaults Num body If AttributeLoad NameLoad attr body Raise Call NameLoad Str Raise Call NameLoad Num Str decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body If AttributeLoad NameLoad attr body Raise Call NameLoad Str Raise Call NameLoad Num Str decorator_list FunctionDef arguments args NameParam defaults body If AttributeLoad NameLoad attr body Raise Call NameLoad Str Raise Call NameLoad Num Str decorator_list FunctionDef arguments args NameParam defaults body If AttributeLoad NameLoad attr body Raise Call NameLoad Assign NameStore Call AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Raise Call NameLoad Return NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body If CompareIs NameLoad NameLoad body Raise Call NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Num FunctionDef arguments args defaults body Expr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr decorator_list Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr While Num body Assign NameStore Call AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Return Expr Yield SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam defaults body If UnaryOpNot AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body If AttributeLoad NameLoad attr body Raise Call NameLoad Str AugAssignAdd AttributeStore NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body If AttributeLoad NameLoad attr body Raise Call NameLoad Str Assign NameStore Call AttributeLoad Str attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr ListLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Num Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body If UnaryOpNot AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad If Call NameLoad AttributeLoad NameLoad attr Str body Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num body If AttributeLoad NameLoad attr body Raise Call NameLoad Str If CompareEq NameLoad Num body AugAssignAdd NameStore AttributeLoad NameLoad attr orelse If CompareEq NameLoad Num body Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr BinOpAdd AttributeLoad NameLoad attr NameLoad Return orelse If CompareNotEq NameLoad Num body Raise Call NameLoad Str Assign NameStore ListLoad TryExcept body Assign NameStore Call NameLoad AttributeLoad NameLoad attr While CompareGt NameLoad NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AugAssignAdd NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Pass If NameLoad body AugAssignAdd AttributeStore NameLoad attr Call AttributeLoad Str attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad Num NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults Num body If AttributeLoad NameLoad attr body Raise Call NameLoad Str If CompareLt NameLoad Num body AugAssignAdd AttributeStore NameLoad attr Call AttributeLoad Str attr AttributeLoad NameLoad attr Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Slice AttributeLoad NameLoad attr AugAssignAdd AttributeStore NameLoad attr Call NameLoad NameLoad Return NameLoad Assign NameStore BinOpAdd AttributeLoad NameLoad attr NameLoad Assign NameStore ListLoad TryExcept body Assign NameStore Call NameLoad AttributeLoad NameLoad attr While CompareGt NameLoad NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AugAssignAdd NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body Pass If NameLoad body AugAssignAdd AttributeStore NameLoad attr Call AttributeLoad Str attr NameLoad Assign NameStore Call NameLoad Num NameLoad TryFinally body Return SubscriptLoad AttributeLoad NameLoad attr Slice AttributeLoad NameLoad attr NameLoad finalbody Assign AttributeStore NameLoad attr Call NameLoad NameLoad Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body If AttributeLoad NameLoad attr body Raise Call NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str AttributeLoad NameLoad attr Assign NameStore ListLoad TryExcept body Assign NameStore AttributeLoad NameLoad attr While CompareLt NameLoad Num body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad If CompareGtE NameLoad Num body Assign NameStore BinOpAdd NameLoad NameLoad Break AugAssignAdd NameStore Call NameLoad NameLoad handlers ExceptHandler type NameLoad body Pass If NameLoad body AugAssignAdd AttributeStore NameLoad attr Call AttributeLoad Str attr NameLoad If CompareLt NameLoad Num body Assign NameStore Call NameLoad AttributeLoad NameLoad attr orelse Assign NameStore BinOpAdd NameLoad Num If BoolOpAnd CompareIsNot NameLoad NameLoad CompareLt BinOpAdd AttributeLoad NameLoad attr NameLoad NameLoad body Assign NameStore BinOpAdd AttributeLoad NameLoad attr NameLoad TryFinally body Return SubscriptLoad AttributeLoad NameLoad attr Slice AttributeLoad NameLoad attr NameLoad finalbody Assign AttributeStore NameLoad attr Call NameLoad NameLoad Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults Num body Assign NameStore Num Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr While NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad AugAssignAdd NameStore Call NameLoad NameLoad If CompareLtLtE Num NameLoad NameLoad body Break Assign NameStore Call AttributeLoad NameLoad attr Return NameLoad decorator_list decorator_list
N/A N/A 
    werkzeug.contrib.iterio
    ~~~~~~~~~~~~~~~~~~~~~~~

    This module implements a :class:`IterIO` that converts an iterator into
    a stream object and the other way round.  Converting streams into
    iterators requires the `greenlet`_ module.

    To convert an iterator into a stream all you have to do is to pass it
    directly to the :class:`IterIO` constructor.  In this example we pass it
    a newly created generator::

        def foo():
            yield "something\n"
            yield "otherthings"
        stream = IterIO(foo())
        print stream.read()         # read the whole iterator

    The other way round works a bit different because we have to ensure that
    the code execution doesn't take place yet.  An :class:`IterIO` call with a
    callable as first argument does two things.  The function itself is passed
    an :class:`IterIO` stream it can feed.  The object returned by the
    :class:`IterIO` constructor on the other hand is not an stream object but
    an iterator::

        def foo(stream):
            stream.write("some")
            stream.write("thing")
            stream.flush()
            stream.write("otherthing")
        iterator = IterIO(foo)
        print iterator.next()       # prints something
        print iterator.next()       # prints otherthing
        iterator.next()             # raises StopIteration

    .. _greenlet: http://codespeak.net/py/dist/greenlet.html

    :copyright: (c) 2011 by the Werkzeug Team, see AUTHORS for more details.
    :license: BSD, see LICENSE for more details.
 N/A N/A N/A greenlet N/A N/A N/A ImportError N/A N/A greenlet None IterIO N/A object N/A N/A Instances of this object implement an interface compatible with the
    standard Python :class:`file` object.  Streams are either read-only or
    write-only depending on how the object is created.
     __new__ N/A N/A cls obj N/A N/A N/A N/A N/A iterator N/A iter obj N/A N/A N/A TypeError N/A N/A N/A IterI obj N/A N/A IterO iterator N/A __iter__ N/A N/A self N/A N/A N/A self N/A tell N/A N/A self N/A N/A N/A N/A self closed N/A N/A N/A ValueError I/O operation on closed file N/A N/A self pos N/A isatty N/A N/A self N/A N/A N/A N/A self closed N/A N/A N/A ValueError I/O operation on closed file N/A False N/A seek N/A N/A self pos mode N/A 0 N/A N/A N/A self closed N/A N/A N/A ValueError I/O operation on closed file N/A N/A IOError 9 Bad file descriptor N/A truncate N/A N/A self size N/A None N/A N/A N/A self closed N/A N/A N/A ValueError I/O operation on closed file N/A N/A IOError 9 Bad file descriptor N/A write N/A N/A self s N/A N/A N/A N/A self closed N/A N/A N/A ValueError I/O operation on closed file N/A N/A IOError 9 Bad file descriptor N/A writelines N/A N/A self list N/A N/A N/A N/A self closed N/A N/A N/A ValueError I/O operation on closed file N/A N/A IOError 9 Bad file descriptor N/A read N/A N/A self n N/A -1 N/A N/A N/A self closed N/A N/A N/A ValueError I/O operation on closed file N/A N/A IOError 9 Bad file descriptor N/A readlines N/A N/A self sizehint N/A 0 N/A N/A N/A self closed N/A N/A N/A ValueError I/O operation on closed file N/A N/A IOError 9 Bad file descriptor N/A readline N/A N/A self length N/A None N/A N/A N/A self closed N/A N/A N/A ValueError I/O operation on closed file N/A N/A IOError 9 Bad file descriptor N/A flush N/A N/A self N/A N/A N/A N/A self closed N/A N/A N/A ValueError I/O operation on closed file N/A N/A IOError 9 Bad file descriptor N/A next N/A N/A self N/A N/A N/A N/A self closed N/A N/A N/A StopIteration N/A line N/A N/A self readline N/A N/A line N/A N/A N/A StopIteration N/A line N/A N/A IterI N/A IterIO N/A N/A Convert an stream into an iterator. __new__ N/A N/A cls func N/A N/A N/A N/A greenlet None N/A N/A N/A RuntimeError IterI requires greenlet support N/A stream N/A N/A object __new__ cls N/A N/A stream _parent N/A N/A greenlet getcurrent N/A N/A stream _buffer N/A N/A N/A stream closed False N/A N/A stream pos 0 run N/A N/A N/A N/A N/A N/A func stream N/A N/A N/A stream flush N/A N/A g N/A N/A greenlet greenlet run N/A stream _parent N/A 1 N/A N/A rv N/A N/A g switch N/A N/A rv N/A N/A N/A N/A N/A rv N/A 0 N/A close N/A N/A self N/A N/A N/A N/A N/A self closed N/A N/A N/A self closed True N/A write N/A N/A self s N/A N/A N/A N/A self closed N/A N/A N/A ValueError I/O operation on closed file N/A N/A self pos N/A len s N/A N/A N/A N/A self _buffer append s N/A writelines N/A N/A self list N/A N/A N/A N/A N/A self write N/A N/A join list N/A flush N/A N/A self N/A N/A N/A N/A self closed N/A N/A N/A ValueError I/O operation on closed file N/A data N/A N/A join N/A self _buffer N/A N/A self _buffer N/A N/A N/A N/A N/A self _parent switch N/A data N/A N/A IterO N/A IterIO N/A N/A Iter output.  Wrap an iterator and give it a stream like interface. __new__ N/A N/A cls gen N/A N/A N/A self N/A N/A object __new__ cls N/A N/A self _gen gen N/A N/A self _buf N/A N/A self closed False N/A N/A self pos 0 N/A self N/A __iter__ N/A N/A self N/A N/A N/A self N/A close N/A N/A self N/A N/A N/A N/A N/A self closed N/A N/A N/A self closed True N/A N/A hasattr N/A self _gen close N/A N/A N/A N/A N/A self _gen close N/A seek N/A N/A self pos mode N/A 0 N/A N/A N/A self closed N/A N/A N/A ValueError I/O operation on closed file N/A N/A mode 1 N/A N/A pos N/A self pos N/A N/A N/A mode 2 N/A N/A N/A N/A self read N/A N/A self pos N/A min N/A self pos N/A N/A self pos pos N/A N/A N/A N/A mode 0 N/A N/A N/A IOError Invalid argument N/A buf N/A N/A N/A N/A tmp_end_pos N/A len N/A self _buf N/A N/A pos tmp_end_pos N/A N/A item N/A N/A N/A self _gen next N/A tmp_end_pos N/A len item N/A N/A N/A buf append item N/A N/A N/A StopIteration N/A N/A N/A buf N/A N/A N/A self _buf N/A N/A join buf N/A N/A self pos N/A max 0 pos N/A read N/A N/A self n N/A -1 N/A N/A N/A self closed N/A N/A N/A ValueError I/O operation on closed file N/A N/A n 0 N/A N/A N/A self _buf N/A N/A join N/A self _gen N/A result N/A N/A self _buf N/A N/A self pos N/A N/A self pos N/A len result N/A result N/A new_pos N/A N/A self pos n N/A buf N/A N/A N/A N/A tmp_end_pos N/A len N/A self _buf N/A N/A new_pos tmp_end_pos N/A N/A item N/A N/A N/A self _gen next N/A tmp_end_pos N/A len item N/A N/A N/A buf append item N/A N/A N/A StopIteration N/A N/A N/A buf N/A N/A N/A self _buf N/A N/A join buf N/A new_pos N/A max 0 new_pos N/A N/A N/A N/A N/A self _buf N/A N/A self pos new_pos N/A N/A N/A self pos N/A min new_pos N/A len N/A self _buf N/A readline N/A N/A self length N/A None N/A N/A N/A self closed N/A N/A N/A ValueError I/O operation on closed file N/A nl_pos N/A N/A N/A self _buf find N/A self pos N/A buf N/A N/A N/A N/A pos N/A self pos N/A N/A nl_pos 0 N/A N/A item N/A N/A N/A self _gen next N/A local_pos N/A N/A item find N/A N/A N/A buf append item N/A N/A local_pos 0 N/A N/A nl_pos N/A pos local_pos N/A N/A pos N/A len item N/A N/A N/A StopIteration N/A N/A N/A buf N/A N/A N/A self _buf N/A N/A join buf N/A N/A nl_pos 0 N/A N/A new_pos N/A len N/A self _buf N/A N/A new_pos N/A nl_pos 1 N/A N/A N/A length None N/A N/A N/A self pos length new_pos N/A N/A new_pos N/A N/A self pos length N/A N/A N/A N/A N/A self _buf N/A N/A self pos new_pos N/A N/A N/A self pos N/A min new_pos N/A len N/A self _buf N/A readlines N/A N/A self sizehint N/A 0 N/A N/A total 0 N/A lines N/A N/A line N/A N/A self readline N/A line N/A N/A N/A N/A lines append line N/A total N/A len line N/A N/A 0 sizehint total N/A N/A N/A line N/A N/A self readline N/A lines N/A N/A