Add jimm.py
This commit is contained in:
13
jimm.py
Normal file
13
jimm.py
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
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'
|
||||||
Reference in New Issue
Block a user