1
0
Fork 0
mirror of https://github.com/dbarzin/pandora-box.git synced 2025-07-18 21:09:41 +02:00
pandora-box/tests/slideshow.py

20 lines
433 B
Python
Raw Permalink Normal View History

2022-07-14 13:28:22 +02:00
#!/usr/bin/python3
2023-02-25 18:59:41 +01:00
import os
2022-07-14 13:28:22 +02:00
def waitMouseClick():
2023-02-25 18:59:41 +01:00
mouse = open("/dev/input/mice", "rb")
down = False
2022-07-14 13:28:22 +02:00
while True:
buf = mouse.read(3)
2023-02-25 18:59:41 +01:00
if ((buf[0] & 0x1) == 1):
2022-07-25 01:00:07 +02:00
down = True
2023-02-25 18:59:41 +01:00
if (((buf[0] & 0x1) == 0) and down):
break
2022-07-14 13:28:22 +02:00
mouse.close()
2023-02-25 18:59:41 +01:00
2022-07-14 13:28:22 +02:00
os.system("fim *.png -qa -c 'while(1){display;sleep 1;next;}' </dev/null 2>/dev/null &")
waitMouseClick()
2022-07-14 14:00:37 +02:00
os.system("killall -s 9 fim")