Running this code under Spyder:

*async def main():*
*    print('Hello ...')*
*    await asyncio.sleep(1)*
*    print('... World!')*

*# Python 3.7+*
*print('go\n')*
*asyncio.run(main())*

gives me:

*RuntimeError: asyncio.run() cannot be called from a running event loop*

Under IDLE or from the terminal, the code runs successfully.

Any thoughts?

-- 
You received this message because you are subscribed to the Google Groups 
"spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/spyderlib/b1dda54a-73c1-48d0-8bc8-12a27af0dce4%40googlegroups.com.

Reply via email to