python-pillow / Sane

Python interface to the SANE scanner and frame grabber
Other
54 stars 19 forks source link

support simple progress hook #54

Closed WaferJay closed 5 years ago

WaferJay commented 5 years ago

I think that ease of use is more important. So, I added a little code to hook current line and total lines.

dev.snap(progress=lambda c, t: print(f'{c}/{t}'))

Have a nice day!

manisandro commented 5 years ago

Thanks! Can arr_snap also be extended to take a progress hook?

WaferJay commented 5 years ago

Sure. I will commit it as soon as possible.

How careless I am ...

manisandro commented 5 years ago

Great, thanks!

WaferJay commented 5 years ago

It is my pleasure. :-)