Re: [python-tulip] BitTorrent client with asyncio (Python 3.4.3)

2015-12-02 Thread Leslie Klein
Thank you! loop.create_task does exactly what I want. main uses another level of yield from (as you explained). That way I don't use loop.run_until_complete within main. Here is my top-level code that integrates server task and client tasks and runs them in one loop: # create client

Re: [python-tulip] BitTorrent client with asyncio (Python 3.4.3)

2015-12-01 Thread Guido van Rossum
Hi Leslie, This sounds like a cool project. I don't know how to answer #1 (maybe 0.0.0.0 would work?) but for #2, instead of using run_until_complete() you should probably use a combination of coroutines and tasks. Inside a coroutine, if you want to wait for another coroutine, use "yield from