13 lines
377 B
Python
13 lines
377 B
Python
import os, asyncio, contextlib, multiprocessing
|
|
|
|
unsafe = contextlib.suppress(Exception)
|
|
|
|
with unsafe:
|
|
asyncio.get_running_loop()
|
|
asyncio.run = lambda main: threading.Thread(
|
|
target=lambda: asyncio.runners.run(main)).start()
|
|
|
|
def go(func, *args, **kwargs):
|
|
multiprocessing.Process(target=func, args=args, kwargs=kwargs).start()
|
|
|
|
os.environ['DISPLAY'] = ':0' |