One of the big problems I've seen with the basic approachability  of
async/await in Python is the lack of interpreter support.

You might want to have a look at aioconsole [1]; it provides an asynchronous REPL that you can use to interact with asyncio servers.

You can try it out using the apython script:

$ apython
Python 3.5.0 (default, Sep 7 2015, 14:12:03)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
---
This console is running in an asyncio event loop.
It allows you to wait for coroutines using the 'await' syntax.
Try: await asyncio.sleep(1, result=3)
---
>>> await asyncio.sleep(1, result=3)
# Wait one second...
3
>>>

There is also two ipython extensions:
- ipython-yf [2]
- asyncio-ipython-magic [3]

[1] https://github.com/vxgmichel/aioconsole
[2] https://github.com/tecki/ipython-yf
[3] https://github.com/Gr1N/asyncio-ipython-magic

Cheers,
/Vincent
_______________________________________________
Async-sig mailing list
Async-sig@python.org
https://mail.python.org/mailman/listinfo/async-sig
Code of Conduct: https://www.python.org/psf/codeofconduct/

Reply via email to