Module Import alias Expr Call AttributeLoad NameLoad attr Str NameLoad keyword Num Expr Str Import alias ImportFrom alias alias alias Assign NameStore ListLoad Str Str Str Str Str Str Str Str Str Str Str Str Str Str ClassDef bases NameLoad body Expr Str Assign NameStore Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad If CompareIs NameLoad NameLoad body Assign NameStore BinOpMod AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Str decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Assign NameStore BinOpMod AttributeLoad NameLoad attr TupleLoad NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str Assign NameStore Str decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body If Call NameLoad NameLoad AttributeLoad NameLoad attr body Return Call NameLoad NameLoad NameLoad NameLoad NameLoad Return Call NameLoad NameLoad NameLoad NameLoad NameLoad decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Pass decorator_list FunctionDef arguments args NameParam defaults vararg body Expr Call AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body If CompareIs AttributeLoad NameLoad attr NameLoad body Return If Call AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body If Call AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad AttributeLoad NameLoad attr orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr Call NameLoad AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Num For TupleStore NameStore NameStore Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad Assign NameStore BinOpAdd NameLoad Num Assign NameStore BinOpMult ListLoad NameLoad NameLoad Assign NameStore Num While CompareLt NameLoad NameLoad body TryExcept body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body If UnaryOpNot NameLoad body Raise orelse Assign SubscriptStore NameLoad Index NameLoad NameLoad AugAssignAdd NameStore Num Return NameLoad decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore TupleLoad AttributeLoad Call NameLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assert CompareNotEq NameLoad Str Return Call NameLoad AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad AttributeLoad NameLoad attr NameLoad decorator_list decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body If UnaryOpNot NameLoad body Assign NameStore TupleLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If NameLoad body Raise Call NameLoad BinOpMod Str Call AttributeLoad Str attr Call AttributeLoad NameLoad attr For NameStore NameLoad body If UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad Call AttributeLoad NameLoad attr attr Num AttributeLoad NameLoad attr NameLoad If BoolOpAnd NameLoad CompareIsNot Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr attr body Expr Call AttributeLoad NameLoad attr Num decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Return Str decorator_list Assign NameStore NameLoad decorator_list Assign NameStore Call NameLoad FunctionDef arguments args NameParam defaults vararg body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr attr Expr Call AttributeLoad Call AttributeLoad NameLoad attr attr Num AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad Expr Call AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr If CompareIsNot AttributeLoad NameLoad attr NameLoad body If CompareIs AttributeLoad NameLoad attr NameLoad body Assign NameStore Call NameLoad AttributeLoad NameLoad attr If CompareGt Call NameLoad NameLoad Num body Assign NameStore BinOpAdd SubscriptLoad NameLoad Slice Num Str Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad orelse Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad Call NameLoad AttributeLoad NameLoad attr Call NameLoad AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad Call NameLoad NameLoad attr Return BinOpMod Str TupleLoad NameLoad Call NameLoad Call NameLoad NameLoad Call AttributeLoad Str attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return CompareIsNot AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return BoolOpAnd CompareIsNot AttributeLoad NameLoad attr NameLoad CompareIs AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return BoolOpAnd CompareIsNot AttributeLoad NameLoad attr NameLoad CompareIsNot AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body If UnaryOpNot AttributeLoad NameLoad attr body Return TupleLoad NameLoad NameLoad NameLoad orelse If CompareEq Call NameLoad AttributeLoad NameLoad attr Num body Return AttributeLoad NameLoad attr orelse If CompareEq Call NameLoad AttributeLoad NameLoad attr Num body If Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Num NameLoad body Return TupleLoad SubscriptLoad AttributeLoad NameLoad attr Index Num NameLoad NameLoad orelse Return TupleLoad AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr SubscriptLoad AttributeLoad NameLoad attr Index Num NameLoad orelse If CompareEq Call NameLoad AttributeLoad NameLoad attr Num body Return TupleLoad SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num NameLoad orelse Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body If BoolOpAnd Call AttributeLoad NameLoad attr CompareIsNot AttributeLoad NameLoad attr NameLoad body Return If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If BoolOpAnd Call AttributeLoad NameLoad attr CompareIs NameLoad Call AttributeLoad NameLoad attr body Expr Call NameLoad NameLoad orelse Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body If BoolOpAnd CompareIsNot AttributeLoad NameLoad attr NameLoad CompareIs AttributeLoad NameLoad attr NameLoad body Return If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If BoolOpAnd Call AttributeLoad NameLoad attr CompareIs NameLoad Call AttributeLoad NameLoad attr body Expr Call NameLoad NameLoad orelse Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If BoolOpAnd Call AttributeLoad NameLoad attr CompareIs NameLoad Call AttributeLoad NameLoad attr body If CompareIs AttributeLoad NameLoad attr NameLoad body Expr Call NameLoad NameLoad orelse Expr Call NameLoad NameLoad orelse Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index NameLoad NameLoad If CompareIsNot AttributeLoad NameLoad attr NameLoad body If CompareIs AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body If CompareIs NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body If Call NameLoad NameLoad Str body Return Call NameLoad NameLoad If Call NameLoad NameLoad Str body Return Call NameLoad NameLoad orelse If Call NameLoad NameLoad Str body Return Call NameLoad NameLoad orelse Raise Call NameLoad BinOpMod Str TupleLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Assert UnaryOpNot Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call AttributeLoad NameLoad attr attr Num AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults vararg body Assert UnaryOpNot Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call AttributeLoad NameLoad attr attr Num AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body While NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr TryExcept body If CompareIn NameLoad NameLoad body TryFinally body Expr Call NameLoad NameLoad finalbody Expr Call AttributeLoad NameLoad attr NameLoad NameLoad handlers ExceptHandler body Expr Call AttributeLoad Call AttributeLoad NameLoad attr attr Num AttributeLoad NameLoad attr NameLoad NameLoad Raise decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad vararg body Expr Str If CompareIsNot AttributeLoad NameLoad attr NameLoad body If CompareIs AttributeLoad NameLoad attr NameLoad body Return AttributeLoad NameLoad attr orelse Expr Call AttributeLoad Call AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr If CompareEq NameLoad Num body If Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad body Return orelse TryExcept body Expr Call AttributeLoad Call AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr handlers ExceptHandler body If UnaryOpNot Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr body Raise Return Assign NameStore NameLoad TryFinally body TryExcept body Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad TryFinally body Return Call AttributeLoad NameLoad attr finalbody Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler body Assign NameStore NameLoad If BoolOpOr CompareIs NameLoad NameLoad UnaryOpNot Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr body Raise finalbody If BoolOpAnd CompareIsNot NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assert CompareIs Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr attr If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Expr Str Assert CompareIs Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr attr If CompareIsNot AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assert CompareIs AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assert CompareIsNot NameLoad AttributeLoad Call AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr NameLoad TryFinally body Return Call AttributeLoad Call AttributeLoad NameLoad attr attr finalbody Assign AttributeStore NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body If BoolOpAnd CompareIsNot AttributeLoad NameLoad attr NameLoad AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore Str orelse Assign NameStore Str Return BinOpAdd ListLoad BinOpMod Str TupleLoad AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad Call NameLoad NameLoad attr Return BinOpMod Str TupleLoad NameLoad Call AttributeLoad Str attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body If Call AttributeLoad NameLoad attr body Return NameLoad If CompareIsNot AttributeLoad NameLoad attr NameLoad body Return Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return BoolOpOr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults vararg kwarg body Expr Str Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults vararg kwarg body Expr Str Assert CompareIs AttributeLoad NameLoad attr NameLoad Str If CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str TryExcept body Assign NameStore Call NameLoad NameLoad NameLoad handlers ExceptHandler body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Raise orelse Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Expr Str If UnaryOpNot AttributeLoad NameLoad attr body If UnaryOpNot NameLoad body Assign NameStore TupleLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Expr Str If UnaryOpNot AttributeLoad NameLoad attr body If UnaryOpNot NameLoad body Assign NameStore TupleLoad NameLoad Expr Call AttributeLoad Call AttributeLoad NameLoad attr attr Num AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareIsNot Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr attr body Expr Call AttributeLoad NameLoad attr Num decorator_list decorator_list Assign NameStore AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults vararg kwarg body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body TryExcept body Return Call AttributeLoad NameLoad attr NameLoad NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr name NameStore body Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad AttributeLoad NameLoad attr NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults vararg body Assign AttributeStore NameLoad attr Call NameLoad NameLoad If NameLoad body For NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num body Expr Call AttributeLoad NameLoad attr Lambda arguments args NameParam defaults Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body If Call NameLoad NameLoad AttributeLoad NameLoad attr body For NameStore AttributeLoad NameLoad attr body If CompareEq AttributeLoad NameLoad attr NameLoad body Return NameLoad orelse Return CompareIn NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr Lambda arguments args NameParam defaults Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults vararg kwarg body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body While AttributeLoad NameLoad attr body Expr Call NameLoad AttributeLoad NameLoad attr keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg kwarg body Return Call NameLoad AttributeLoad NameLoad attr NameLoad NameLoad decorator_list decorator_list ClassDef bases NameLoad body Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Lambda arguments args defaults vararg Call AttributeLoad AttributeLoad NameLoad attr attr Return NameLoad decorator_list decorator_list
N/A N/A warnings N/A N/A N/A warnings warn The proc module is deprecated!  Please use the greenthread module, or any of the many other Eventlet cross-coroutine primitives, instead. DeprecationWarning stacklevel 2 N/A 
This module provides means to spawn, kill and link coroutines. Linking means
subscribing to the coroutine's result, either in form of return value or
unhandled exception.

To create a linkable coroutine use spawn function provided by this module:

    >>> def demofunc(x, y):
    ...    return x / y
    >>> p = spawn(demofunc, 6, 2)

The return value of :func:`spawn` is an instance of :class:`Proc` class that
you can "link":

 * ``p.link(obj)`` - notify *obj* when the coroutine is finished

What "notify" means here depends on the type of *obj*: a callable is simply
called, an :class:`~eventlet.coros.Event` or a :class:`~eventlet.coros.queue`
is notified using ``send``/``send_exception`` methods and if *obj* is another
greenlet it's killed with :class:`LinkedExited` exception.

Here's an example:

>>> event = coros.Event()
>>> _ = p.link(event)
>>> event.wait()
3

Now, even though *p* is finished it's still possible to link it. In this
case the notification is performed immediatelly:

>>> try:
...     p.link()
... except LinkedCompleted:
...     print 'LinkedCompleted'
LinkedCompleted

(Without an argument, the link is created to the current greenlet)

There are also :meth:`~eventlet.proc.Source.link_value` and
:func:`link_exception` methods that only deliver a return value and an
unhandled exception respectively (plain :meth:`~eventlet.proc.Source.link`
delivers both).  Suppose we want to spawn a greenlet to do an important part of
the task; if it fails then there's no way to complete the task so the parent
must fail as well; :meth:`~eventlet.proc.Source.link_exception` is useful here:

>>> p = spawn(demofunc, 1, 0)
>>> _ = p.link_exception()
>>> try:
...     api.sleep(1)
... except LinkedFailed:
...     print 'LinkedFailed'
LinkedFailed

One application of linking is :func:`waitall` function: link to a bunch of
coroutines and wait for all them to complete. Such a function is provided by
this module.
 N/A sys eventlet api coros hubs N/A __all__ N/A LinkedExited LinkedFailed LinkedCompleted LinkedKilled ProcExit Link waitall killall Source Proc spawn spawn_link spawn_link_value spawn_link_exception LinkedExited N/A Exception N/A N/A Raised when a linked proc exits N/A msg %r exited __init__ N/A N/A self name msg N/A None None N/A N/A N/A self name name N/A N/A msg None N/A N/A msg N/A N/A self msg N/A self name N/A N/A N/A Exception __init__ self msg N/A N/A LinkedCompleted N/A LinkedExited N/A N/A Raised when a linked proc finishes the execution cleanly N/A msg %r completed successfully N/A LinkedFailed N/A LinkedExited N/A N/A Raised when a linked proc dies because of unhandled exception N/A msg %r failed with %s __init__ N/A N/A self name typ value tb N/A None None N/A N/A msg N/A N/A self msg N/A name N/A typ __name__ N/A N/A N/A LinkedExited __init__ self name msg N/A N/A LinkedKilled N/A LinkedFailed N/A N/A Raised when a linked proc dies because of unhandled GreenletExit
    (i.e. it was killed)
     N/A msg %r was killed with %s N/A getLinkedFailed N/A N/A name typ value tb N/A None None N/A N/A N/A issubclass typ N/A api GreenletExit N/A N/A N/A LinkedKilled name typ value tb N/A N/A LinkedFailed name typ value tb N/A ProcExit N/A N/A api GreenletExit N/A N/A Raised when this proc is killed. N/A Link N/A object N/A N/A 
    A link to a greenlet, triggered when the greenlet exits.
     __init__ N/A N/A self listener N/A N/A N/A N/A self listener listener N/A cancel N/A N/A self N/A N/A N/A N/A self listener None N/A __enter__ N/A N/A self N/A N/A N/A N/A __exit__ N/A N/A self N/A args N/A N/A N/A N/A self cancel N/A N/A LinkToEvent N/A Link N/A __call__ N/A N/A self source N/A N/A N/A N/A N/A self listener None N/A N/A N/A N/A N/A source has_value N/A N/A N/A N/A N/A self listener send N/A source value N/A N/A N/A N/A N/A self listener send_exception N/A N/A source exc_info N/A N/A LinkToGreenlet N/A Link N/A __call__ N/A N/A self source N/A N/A N/A N/A N/A source has_value N/A N/A N/A N/A N/A self listener throw N/A LinkedCompleted N/A source name N/A N/A N/A N/A N/A self listener throw N/A getLinkedFailed N/A source name N/A N/A source exc_info N/A N/A LinkToCallable N/A Link N/A __call__ N/A N/A self source N/A N/A N/A N/A N/A self listener source N/A N/A waitall N/A N/A lst trap_errors queue N/A False None N/A N/A N/A queue None N/A N/A queue N/A N/A coros queue N/A index -1 N/A N/A index linkable N/A enumerate lst N/A N/A N/A N/A linkable link N/A decorate_send queue index N/A len N/A index 1 N/A results N/A N/A None len N/A count 0 N/A N/A count len N/A N/A N/A N/A N/A index value N/A N/A queue wait N/A N/A N/A Exception N/A N/A N/A trap_errors N/A N/A N/A N/A N/A results N/A index value N/A count 1 N/A results N/A decorate_send N/A object N/A __init__ N/A N/A self event tag N/A N/A N/A N/A self _event event N/A N/A self _tag tag N/A __repr__ N/A N/A self N/A N/A N/A params N/A N/A N/A type self __name__ N/A self _tag N/A self _event N/A N/A <%s tag=%r event=%r> params N/A __getattr__ N/A N/A self name N/A N/A N/A N/A name _event N/A N/A getattr N/A self _event name N/A send N/A N/A self value N/A N/A N/A N/A N/A N/A self _event send N/A N/A self _tag value N/A N/A killall N/A N/A procs N/A throw_args kwargs N/A N/A N/A throw_args N/A N/A throw_args N/A ProcExit N/A wait N/A N/A kwargs pop wait False N/A kwargs N/A N/A N/A TypeError N/A Invalid keyword argument for proc.killall(): %s N/A N/A ,  join N/A N/A kwargs keys N/A g procs N/A N/A N/A N/A g dead N/A N/A N/A N/A N/A N/A hubs get_hub schedule_call_global 0 N/A g throw throw_args N/A N/A wait N/A N/A N/A api getcurrent N/A N/A N/A hubs get_hub greenlet N/A N/A N/A N/A api sleep 0 N/A NotUsed N/A object N/A __str__ N/A N/A self N/A N/A N/A <Source instance does not hold a value or an exception> N/A N/A __repr__ __str__ N/A N/A _NOT_USED N/A NotUsed spawn_greenlet N/A N/A function N/A args N/A N/A Create a new greenlet that will run ``function(*args)``.
    The current greenlet won't be unscheduled. Keyword arguments aren't
    supported (limitation of greenlet), use :func:`spawn` to work around that.
     N/A g N/A N/A api Greenlet function N/A N/A g parent N/A N/A N/A hubs get_hub greenlet N/A N/A N/A N/A N/A hubs get_hub schedule_call_global 0 N/A g switch args N/A g N/A Source N/A object N/A N/A Maintain a set of links to the listeners. Delegate the sent value or
    the exception to all of them.

    To set up a link, use :meth:`link_value`, :meth:`link_exception` or
    :meth:`link` method. The latter establishes both "value" and "exception"
    link. It is possible to link to events, queues, greenlets and callables.

    >>> source = Source()
    >>> event = coros.Event()
    >>> _ = source.link(event)

    Once source's :meth:`send` or :meth:`send_exception` method is called, all
    the listeners with the right type of link will be notified ("right type"
    means that exceptions won't be delivered to "value" links and values won't
    be delivered to "exception" links). Once link has been fired it is removed.

    Notifying listeners is performed in the **mainloop** greenlet. Under the
    hood notifying a link means executing a callback, see :class:`Link` class
    for details. Notification *must not* attempt to switch to the hub, i.e.
    call any blocking functions.

    >>> source.send('hello')
    >>> event.wait()
    'hello'

    Any error happened while sending will be logged as a regular unhandled
    exception. This won't prevent other links from being fired.

    There 3 kinds of listeners supported:

     1. If *listener* is a greenlet (regardless if it's a raw greenlet or an
        extension like :class:`Proc`), a subclass of :class:`LinkedExited`
        exception is raised in it.

     2. If *listener* is something with send/send_exception methods (event,
        queue, :class:`Source` but not :class:`Proc`) the relevant method is
        called.

     3. If *listener* is a callable, it is called with 1 argument (the result)
        for "value" links and with 3 arguments ``(typ, value, tb)`` for
        "exception" links.
     __init__ N/A N/A self name N/A None N/A N/A N/A self name name N/A N/A self _value_links N/A N/A N/A self _exception_links N/A N/A N/A self value _NOT_USED N/A N/A self _exc None N/A _repr_helper N/A N/A self N/A N/A N/A result N/A N/A N/A N/A result append N/A repr N/A self name N/A N/A N/A self value _NOT_USED N/A N/A N/A N/A self _exc None N/A N/A res N/A repr N/A self value N/A N/A N/A len res 50 N/A N/A res N/A N/A res N/A 50 ... N/A N/A N/A result append N/A result=%s res N/A N/A N/A N/A result append N/A raised=%s N/A N/A self _exc N/A N/A N/A result append N/A {%s:%s} N/A N/A len N/A self _value_links N/A len N/A self _exception_links N/A result N/A __repr__ N/A N/A self N/A N/A N/A klass N/A N/A type self __name__ N/A N/A <%s at %s %s> N/A klass N/A hex N/A id self N/A N/A join N/A N/A self _repr_helper N/A ready N/A N/A self N/A N/A N/A N/A N/A self value _NOT_USED N/A has_value N/A N/A self N/A N/A N/A N/A N/A N/A self value _NOT_USED N/A N/A self _exc None N/A has_exception N/A N/A self N/A N/A N/A N/A N/A N/A self value _NOT_USED N/A N/A self _exc None N/A exc_info N/A N/A self N/A N/A N/A N/A N/A self _exc N/A N/A N/A None None None N/A N/A N/A N/A len N/A self _exc 3 N/A N/A N/A self _exc N/A N/A N/A N/A len N/A self _exc 1 N/A N/A N/A isinstance N/A N/A self _exc N/A 0 type N/A N/A N/A N/A N/A self _exc N/A 0 None None N/A N/A N/A N/A N/A N/A self _exc N/A 0 __class__ N/A N/A self _exc N/A 0 None N/A N/A N/A N/A len N/A self _exc 2 N/A N/A N/A N/A N/A self _exc N/A 0 N/A N/A self _exc N/A 1 None N/A N/A N/A self _exc N/A link_value N/A N/A self listener link N/A None None N/A N/A N/A N/A N/A self ready N/A N/A self _exc None N/A N/A N/A N/A listener None N/A N/A listener N/A N/A api getcurrent N/A N/A link None N/A N/A link N/A N/A self getLink listener N/A N/A N/A N/A self ready N/A listener N/A N/A api getcurrent N/A N/A N/A link self N/A N/A N/A N/A self _value_links N/A listener link N/A N/A N/A self value _NOT_USED N/A N/A N/A N/A self _start_send N/A link N/A link_exception N/A N/A self listener link N/A None None N/A N/A N/A N/A N/A self value _NOT_USED N/A N/A self _exc None N/A N/A N/A N/A listener None N/A N/A listener N/A N/A api getcurrent N/A N/A link None N/A N/A link N/A N/A self getLink listener N/A N/A N/A N/A self ready N/A listener N/A N/A api getcurrent N/A N/A N/A link self N/A N/A N/A N/A self _exception_links N/A listener link N/A N/A N/A self value _NOT_USED N/A N/A N/A N/A self _start_send_exception N/A link N/A link N/A N/A self listener link N/A None None N/A N/A N/A listener None N/A N/A listener N/A N/A api getcurrent N/A N/A link None N/A N/A link N/A N/A self getLink listener N/A N/A N/A N/A self ready N/A listener N/A N/A api getcurrent N/A N/A N/A N/A self _exc None N/A N/A N/A link self N/A N/A N/A link self N/A N/A N/A N/A self _value_links N/A listener link N/A N/A N/A self _exception_links N/A listener link N/A N/A N/A self value _NOT_USED N/A N/A N/A N/A self _exc None N/A N/A N/A N/A self _start_send N/A N/A N/A N/A self _start_send_exception N/A link N/A unlink N/A N/A self listener N/A None N/A N/A N/A listener None N/A N/A listener N/A N/A api getcurrent N/A N/A N/A N/A self _value_links pop listener None N/A N/A N/A N/A self _exception_links pop listener None N/A getLink N/A N/A listener N/A N/A N/A N/A hasattr listener throw N/A N/A N/A LinkToGreenlet listener N/A N/A hasattr listener send N/A N/A N/A LinkToEvent listener N/A N/A N/A hasattr listener __call__ N/A N/A N/A LinkToCallable listener N/A N/A N/A TypeError N/A Don't know how to link to %r N/A listener N/A staticmethod send N/A N/A self value N/A N/A N/A N/A N/A N/A self ready N/A %s has been fired already self N/A N/A self value value N/A N/A self _exc None N/A N/A N/A self _start_send N/A _start_send N/A N/A self N/A N/A N/A N/A N/A N/A N/A hubs get_hub schedule_call_global 0 N/A self _do_send N/A N/A N/A self _value_links items N/A self _value_links N/A send_exception N/A N/A self N/A throw_args N/A N/A N/A N/A N/A self ready N/A %s has been fired already self N/A N/A self value None N/A N/A self _exc throw_args N/A N/A N/A self _start_send_exception N/A _start_send_exception N/A N/A self N/A N/A N/A N/A N/A N/A N/A hubs get_hub schedule_call_global 0 N/A self _do_send N/A N/A N/A self _exception_links items N/A self _exception_links N/A _do_send N/A N/A self links consult N/A N/A N/A links N/A N/A N/A listener link N/A N/A links pop N/A N/A N/A N/A listener consult N/A N/A N/A N/A N/A link self N/A N/A N/A N/A consult pop listener None N/A N/A N/A N/A N/A N/A N/A N/A hubs get_hub schedule_call_global 0 N/A self _do_send links consult N/A N/A wait N/A N/A self timeout N/A None throw_args N/A N/A Wait until :meth:`send` or :meth:`send_exception` is called or
        *timeout* has expired. Return the argument of :meth:`send` or raise the
        argument of :meth:`send_exception`. If *timeout* has expired, ``None``
        is returned.

        The arguments, when provided, specify how many seconds to wait and what
        to do when *timeout* has expired. They are treated the same way as
        :func:`~eventlet.api.timeout` treats them.
         N/A N/A N/A self value _NOT_USED N/A N/A N/A N/A self _exc None N/A N/A N/A self value N/A N/A N/A N/A N/A N/A api getcurrent throw N/A self _exc N/A N/A timeout None N/A N/A timer N/A N/A api timeout timeout throw_args N/A N/A N/A timer __enter__ N/A N/A timeout 0 N/A N/A N/A N/A timer __exit__ None None None N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A api getcurrent throw N/A timer throw_args N/A N/A N/A N/A N/A N/A N/A timer __exit__ N/A N/A sys exc_info N/A N/A N/A N/A EXC True N/A N/A N/A N/A N/A waiter N/A Waiter N/A N/A N/A self link waiter N/A N/A N/A N/A N/A waiter wait N/A N/A N/A N/A self unlink waiter N/A N/A N/A N/A EXC False N/A N/A N/A timeout None N/A N/A N/A timer __exit__ N/A N/A sys exc_info N/A N/A N/A N/A N/A N/A timeout None EXC N/A N/A N/A N/A timer __exit__ None None None N/A N/A Waiter N/A object N/A __init__ N/A N/A self N/A N/A N/A N/A self greenlet None N/A send N/A N/A self value N/A N/A N/A Wake up the greenlet that is calling wait() currently (if there is one).
        Can only be called from get_hub().greenlet.
         N/A N/A N/A N/A api getcurrent N/A N/A N/A hubs get_hub greenlet N/A N/A N/A self greenlet None N/A N/A N/A N/A N/A self greenlet switch value N/A send_exception N/A N/A self N/A throw_args N/A N/A Make greenlet calling wait() wake up (if there is a wait()).
        Can only be called from get_hub().greenlet.
         N/A N/A N/A N/A api getcurrent N/A N/A N/A hubs get_hub greenlet N/A N/A N/A self greenlet None N/A N/A N/A N/A N/A self greenlet throw throw_args N/A wait N/A N/A self N/A N/A N/A Wait until send or send_exception is called. Return value passed
        into send() or raise exception passed into send_exception().
         N/A N/A N/A self greenlet None N/A current N/A N/A api getcurrent N/A N/A current N/A N/A N/A hubs get_hub greenlet N/A N/A self greenlet current N/A N/A N/A N/A N/A N/A N/A hubs get_hub switch N/A N/A N/A self greenlet None N/A N/A Proc N/A Source N/A N/A A linkable coroutine based on Source.
    Upon completion, delivers coroutine's result to the listeners.
     __init__ N/A N/A self name N/A None N/A N/A N/A self greenlet None N/A N/A N/A Source __init__ self name N/A _repr_helper N/A N/A self N/A N/A N/A N/A N/A N/A self greenlet None N/A N/A self greenlet dead N/A N/A dead (dead) N/A N/A dead N/A N/A N/A N/A %r%s N/A N/A self greenlet dead N/A N/A Source _repr_helper self N/A __repr__ N/A N/A self N/A N/A N/A klass N/A N/A type self __name__ N/A N/A <%s %s> N/A klass N/A N/A join N/A N/A self _repr_helper N/A __nonzero__ N/A N/A self N/A N/A N/A N/A N/A self ready N/A N/A False N/A N/A N/A self greenlet None N/A N/A N/A bool N/A self greenlet N/A dead N/A N/A self N/A N/A N/A N/A N/A N/A self ready N/A N/A self greenlet dead N/A property spawn N/A N/A cls function N/A args kwargs N/A N/A Return a new :class:`Proc` instance that is scheduled to execute
        ``function(*args, **kwargs)`` upon the next hub iteration.
         N/A proc N/A cls N/A N/A N/A proc run function args kwargs N/A proc N/A classmethod run N/A N/A self function N/A args kwargs N/A N/A Create a new greenlet to execute ``function(*args, **kwargs)``.
        The created greenlet is scheduled to run upon the next hub iteration.
         N/A N/A N/A self greenlet None 'run' can only be called once per instance N/A N/A N/A self name None N/A N/A N/A self name N/A str function N/A N/A self greenlet N/A spawn_greenlet N/A self _run function args kwargs N/A _run N/A N/A self function args kwargs N/A N/A N/A Internal top level function.
        Execute *function* and send its result to the listeners.
         N/A N/A N/A result N/A function args kwargs N/A N/A N/A N/A N/A N/A self send_exception N/A N/A sys exc_info N/A N/A N/A N/A N/A self send result N/A throw N/A N/A self N/A throw_args N/A N/A Used internally to raise the exception.

        Behaves exactly like greenlet's 'throw' with the exception that
        :class:`ProcExit` is raised by default. Do not use this function as it
        leaves the current greenlet unscheduled forever. Use :meth:`kill`
        method instead.
         N/A N/A N/A self dead N/A N/A N/A throw_args N/A N/A throw_args N/A ProcExit N/A N/A N/A N/A self greenlet throw throw_args N/A kill N/A N/A self N/A throw_args N/A N/A 
        Raise an exception in the greenlet. Unschedule the current greenlet so
        that this :class:`Proc` can handle the exception (or die).

        The exception can be specified with *throw_args*. By default,
        :class:`ProcExit` is raised.
         N/A N/A N/A self dead N/A N/A N/A throw_args N/A N/A throw_args N/A ProcExit N/A N/A N/A N/A N/A hubs get_hub schedule_call_global 0 N/A N/A self greenlet throw throw_args N/A N/A N/A N/A api getcurrent N/A N/A N/A hubs get_hub greenlet N/A N/A N/A N/A api sleep 0 N/A N/A N/A spawn N/A Proc spawn spawn_link N/A N/A function N/A args kwargs N/A N/A p N/A spawn function args kwargs N/A N/A N/A p link N/A p N/A spawn_link_value N/A N/A function N/A args kwargs N/A N/A p N/A spawn function args kwargs N/A N/A N/A p link_value N/A p N/A spawn_link_exception N/A N/A function N/A args kwargs N/A N/A p N/A spawn function args kwargs N/A N/A N/A p link_exception N/A p N/A wrap_errors N/A object N/A N/A Helper to make function return an exception, rather than raise it.

    Because every exception that is unhandled by greenlet will be logged by the hub,
    it is desirable to prevent non-error exceptions from leaving a greenlet.
    This can done with simple try/except construct:

    def func1(*args, **kwargs):
        try:
            return func(*args, **kwargs)
        except (A, B, C), ex:
            return ex

    wrap_errors provides a shortcut to write that in one line:

    func1 = wrap_errors((A, B, C), func)

    It also preserves __str__ and __repr__ of the original function.
     __init__ N/A N/A self errors func N/A N/A N/A Make a new function from `func', such that it catches `errors' (an
        Exception subclass, or a tuple of Exception subclasses) and return
        it as a value.
         N/A N/A self errors errors N/A N/A self func func N/A __call__ N/A N/A self N/A args kwargs N/A N/A N/A N/A N/A N/A self func args kwargs N/A N/A N/A N/A self errors N/A ex N/A N/A ex N/A __str__ N/A N/A self N/A N/A N/A N/A str N/A self func N/A __repr__ N/A N/A self N/A N/A N/A N/A repr N/A self func N/A __getattr__ N/A N/A self item N/A N/A N/A N/A getattr N/A self func item N/A N/A RunningProcSet N/A object N/A N/A 
    Maintain a set of :class:`Proc` s that are still running, that is,
    automatically remove a proc when it's finished. Provide a way to wait/kill
    all of them
     __init__ N/A N/A self N/A args N/A N/A N/A self procs N/A set args N/A args N/A N/A p N/A N/A self args N/A 0 N/A N/A N/A N/A p link N/A N/A N/A p N/A N/A N/A N/A self procs discard p N/A __len__ N/A N/A self N/A N/A N/A N/A len N/A self procs N/A __contains__ N/A N/A self item N/A N/A N/A N/A isinstance item N/A api Greenlet N/A N/A x N/A self procs N/A N/A N/A N/A x greenlet item N/A N/A True N/A N/A N/A item N/A self procs N/A __iter__ N/A N/A self N/A N/A N/A N/A iter N/A self procs N/A add N/A N/A self p N/A N/A N/A N/A N/A N/A self procs add p N/A N/A N/A p link N/A N/A N/A p N/A N/A N/A N/A self procs discard p N/A spawn N/A N/A self func N/A args kwargs N/A N/A p N/A spawn func args kwargs N/A N/A N/A self add p N/A p N/A waitall N/A N/A self trap_errors N/A False N/A N/A N/A self procs N/A N/A N/A waitall N/A self procs trap_errors trap_errors N/A killall N/A N/A self N/A throw_args kwargs N/A N/A N/A killall N/A self procs throw_args kwargs N/A N/A Pool N/A object N/A N/A linkable_class Proc __init__ N/A N/A self limit N/A N/A N/A N/A self semaphore N/A N/A coros Semaphore limit N/A allocate N/A N/A self N/A N/A N/A N/A N/A N/A self semaphore acquire N/A g N/A N/A self linkable_class N/A N/A N/A g link N/A N/A N/A N/A _args N/A N/A N/A self semaphore release N/A g N/A N/A