[sane-devel] python-sane - checking for active device

Horst Herb subscriptions at gnumed.net
Tue Mar 21 10:50:02 UTC 2006


What is the correct way of checking whether a device is available (plugged in, 
switched on) using the python SANE interface?

If I switch my scanner off, sane.get_devices(), sane keeps reporting the 
scanner as if it was still available.

If I start the program with the scanner switched off, and switch it on *after* 
calling sane.get_devices(), no scanner is found.

Doing a sane.exit(); sane.init() prior to calling sane.get_devices() makes no 
difference apparently.

What am I missing or doing wrong?

Thankful for any advice,
Horst



More information about the sane-devel mailing list