From 87e6f8f6b584fd265e5e8ea301fab1f2da9f81c9 Mon Sep 17 00:00:00 2001 From: Didier Date: Sat, 11 Jun 2022 14:52:33 +0000 Subject: [PATCH] first commit --- tests/scan.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 tests/scan.py diff --git a/tests/scan.py b/tests/scan.py new file mode 100755 index 0000000..e5d585b --- /dev/null +++ b/tests/scan.py @@ -0,0 +1,26 @@ +#!/usr/bin/python3 + +import pypandora +import time +import sys + +pp = pypandora.PyPandora(root_url= 'http://127.0.0.1:6100') + +for arg in sys.argv[1:]: + print(arg,end='',flush=True) + print(":",end='',flush=True) + + res = pp.submit_from_disk(arg) + + while True: + print('.',end='',flush=True) + time.sleep(1) + + res = pp.task_status(res['taskId']) + + if res['status']!='WAITING': + break + + print(res['status']) + +