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']) + +