#!/usr/bin/env python3

import wx
import os, sys
from wxasync import WxAsyncApp
import asyncio
from asyncio.events import get_event_loop

def run():
    app = WxAsyncApp()

    app.path = os.path.dirname(sys.argv[0])

    from window.main import Main
    import prefs
    import worlds
    import theme

    prefs.Initialize()
    worlds.Initialize()
    theme.Initialize()

    frame = Main(None, "wxpymoo")
    frame.Show(True)

    loop = get_event_loop()
    loop.run_until_complete(app.MainLoop())

if __name__ == "__main__":
    run()

#!/usr/bin/env python3

import wx
import os, sys
from wxasync import WxAsyncApp
import asyncio

def run():
    app = WxAsyncApp()

    app.path = os.path.dirname(sys.argv[0])

    from window.main import Main
    import prefs
    import worlds
    import theme

    prefs.Initialize()
    worlds.Initialize()
    theme.Initialize()

    frame = Main(None, "wxpymoo")
    frame.Show(True)

    app.loop.run_until_complete(app.MainLoop())

if __name__ == "__main__":
    run()

Fix asyncio.get_event_loop deprecation warning