mirror of
https://github.com/dbarzin/pandora-box.git
synced 2025-07-19 13:29:42 +02:00
first commit
This commit is contained in:
parent
f766c8e0ae
commit
87e6f8f6b5
1 changed files with 26 additions and 0 deletions
26
tests/scan.py
Executable file
26
tests/scan.py
Executable file
|
@ -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'])
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue