View Single Post
Old 05-30-2008, 11:46 AM   #24
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,501
Karma: 28548962
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Hmm, now try this

Code:
import wmi, pythoncom
pythoncom.CoInitialize()
_wmi = wmi.WMI()
from calibre.devices.scanner import DeviceScanner
from calibre.devices import devices
ds = DeviceScanner(_wmi)
ds.scan()
for d in devices(): print d, ds.is_device_connected(d)
kovidgoyal is offline   Reply With Quote