1
0
Fork 0
mirror of https://github.com/dbarzin/pandora-box.git synced 2025-07-19 05:19:40 +02:00
pandora-box/tests/loop.py

23 lines
517 B
Python
Raw Normal View History

2022-07-11 21:40:24 +00:00
#!/usr/bin/python3
import os;
def waitMouseClick():
mouse = open( "/dev/input/mice", "rb" )
2022-07-25 01:00:07 +02:00
down = False;
2022-07-11 21:40:24 +00:00
while True:
buf = mouse.read(3)
if ((buf[0] & 0x1)==1):
2022-07-25 01:00:07 +02:00
down = True
if (((buf[0] & 0x1)==0) and down):
2022-07-11 21:40:24 +00:00
break;
mouse.close()
while True:
os.system("killall fim")
2022-07-12 16:16:14 +00:00
os.system("fim -qa image1.png 2>/dev/null &")
2022-07-11 21:40:24 +00:00
waitMouseClick()
os.system("killall fim")
2022-07-12 16:16:14 +00:00
os.system("fim -qa image2.png 2>/dev/null &")
2022-07-11 21:40:24 +00:00
waitMouseClick()