import asyncio from automaton import finish async def main(): await finish() if __name__ == '__main__': loop = asyncio.new_event_loop() try: loop.run_until_complete(main()) finally: loop.close()