print('Hello World') yield from asyncio.sleep(1) print('How are you?') yield from asyncio.sleep(1) loop = asyncio.get_event_loop() loop.run_until_complete(greet_every_two_seconds())
the "asyncio" Module PEP 3148 - futures - execute computations asynchronously PEP 3153 (Superseded) - Asynchronous IO support http://docs.python.org/3.4/library/asyncio.html Youtube: Guido van Rossum - Tulip: Async I/O for Python 3