View Single Post
Old 06-27-2008, 09:13 AM   #41
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,431
Karma: 27757438
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Hmm, possibly. Try the following

Code:
import wmi, pythoncom
pythoncom.CoInitialize()
_wmi = wmi.WMI()
from calibre.devices.scanner import DeviceScanner
scanner = DeviceScanner(_wmi)
scanner.scan()
from calibre.devices import devices
for d in devices():
        if scanner.is_device_connected(d):
            dev = d(log_packets=options.log_packets)

dev.open()
print dev._main_prefix, dev._card_prefix
Is the final line of output showing the wrong drive for card_prefix?
kovidgoyal is online now   Reply With Quote