hello martin, On Wed, Sep 17, 2014 at 12:49:24AM -0700, Martin Teichmann wrote: > >>> yield from f() > [wait three seconds] > done
that looks quite practical for working with ipython3 and asyncio.
i'm wondering: do you see a chance to inspect displayed output items for
yield-from-ability and update them? i'm envisioning something like
> In [1]: f = Future()
> In [2]: f
> Out[2]: <Future pending>
> In [3]: f.set_result(42)
> Out[2]: <Future finished result=42>
> In [4]:
or, to take your example
> In [1]: @coroutine
> ...: def f():
> ...: yield from sleep(3)
> ...: print("DONE")
> In [2]: Task(f())
> Out[2]: <Task pending coro=<f() ...>>
> In [3]: doing_other_stuff()
(that's where the user is interrupted by the PRINT)
> In [4]: doing_more_DONE
> Out[2]: <Task finished coro=<...> result=None>
> In [4]: doing_more_
(but he can continue from there)
would that be feasible based on your ipython integration?
best regards
chrysn
--
Most people would leave. Not us. We're Vikings. We have stubbornness
issues.
-- Hiccup, son of Stoic
signature.asc
Description: Digital signature
