From d9cc0b1ef2777a73a1d9a7a2a795842a3550100f Mon Sep 17 00:00:00 2001 From: dbarzin Date: Thu, 14 Jul 2022 13:28:22 +0200 Subject: [PATCH] work in progress --- tests/README.md | 13 +++++++++++++ tests/slideshow.py | 14 ++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 tests/README.md create mode 100755 tests/slideshow.py diff --git a/tests/README.md b/tests/README.md new file mode 100644 index 0000000..7a50217 --- /dev/null +++ b/tests/README.md @@ -0,0 +1,13 @@ +Pandora-box Tests +----------------- + +This folder contains pandora-box basic function tests : + +- scan.py : scan a file with pandora API +- detect-usb.py : detect the insertion and removal of USB key +- images.py : display an image on the console +- loop.py : a loop between two images waiting for mouse click +- slideshow.py : an other loop between two images waiting for mouse click +- mouse-click.py : detect mouse click +- screen.py : print pandora-box logo using curses +- progress-bar.py : progres bar using curses diff --git a/tests/slideshow.py b/tests/slideshow.py new file mode 100755 index 0000000..689c5dc --- /dev/null +++ b/tests/slideshow.py @@ -0,0 +1,14 @@ +#!/usr/bin/python3 +import os; + +def waitMouseClick(): + mouse = open( "/dev/input/mice", "rb" ) + while True: + buf = mouse.read(3) + if ((buf[0] & 0x1)==1): + break; + mouse.close() + +os.system("fim *.png -qa -c 'while(1){display;sleep 1;next;}' /dev/null &") +waitMouseClick() +os.system("killall fim")