Return an asyncio callback result from task creating function
问题 I'm trying to wrap an async function up so that I can use it without importing asyncio in certain files. The ultimate goal is to use asynchronous functions but being able to call them normally and get back the result. How can I access the result from the callback function printing(task) and use it as the return of my make_task(x) function? MWE: #!/usr/bin/env python3.7 import asyncio loop = asyncio.get_event_loop() def make_task(x): # Can be used without asyncio task = loop.create_task(my