Fix event loops with `asyncio`
@@ -30,6 +30,7 @@ if "widget" not in os.environ:
from collections.abc import Mapping
from types import ModuleType as Module
import stopit
+ import asyncio
try:
from rubicon.objc import *
@@ -330,6 +331,13 @@ if "widget" not in os.environ:
def run():
+ def add_signal_handler(s, f):
+ return
+
+ loop = asyncio.new_event_loop()
+ loop.add_signal_handler = add_signal_handler
+ asyncio.set_event_loop(loop)
+
pip_directory = os.path.expanduser("~/Documents/site-packages")
Python.shared.isScriptRunning = True
os.chdir(currentDir)
