View Single Post
Old 11-09-2007, 11:57 PM   #50
FlyTags
Member
FlyTags began at the beginning.
 
FlyTags's Avatar
 
Posts: 10
Karma: 48
Join Date: Nov 2007
Location: Upstate NY
Device: Amazon Kindle
And the result:

Code:
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import wmi
>>> c = wmi.WMI()
>>> drives = c.Win32_DiskDrive()
>>> ids = [d.PNPDeviceID for d in drives]
>>> partitions = [d.Partitions for d in drives]
>>> print zip(ids, partitions)
[(u'IDE\\DISKWDC_WD4000KD-00NAB0_____________________01.06A01\\5&18DB71A7&0&1.0.
0', 1), (u'IDE\\DISKWDC_WD5000AAKS-00YGA0___________________12.01C02\\5&621C102&
0&0.0.0', 3), (u'USBSTOR\\DISK&VEN_GENERIC&PROD_STORAGE_DEVICE&REV_9339\\2006120
70A&0', 0), (u'USBSTOR\\DISK&VEN_GENERIC&PROD_STORAGE_DEVICE&REV_9339\\200612070
A&1', 0), (u'USBSTOR\\DISK&VEN_GENERIC&PROD_STORAGE_DEVICE&REV_9339\\200612070A&
2', 1), (u'USBSTOR\\DISK&VEN_GENERIC&PROD_STORAGE_DEVICE&REV_9339\\200612070A&3'
, 0), (u'USBSTOR\\DISK&VEN_MEMOREX&PROD_TD_CLASSIC_003C&REV_1.02\\0D504A5162704A
20&0', 1), (u'USBSTOR\\DISK&VEN_SONY&PROD_PRS-505/UC&REV_1000\\080046100042D42E&
0', 1), (u'USBSTOR\\DISK&VEN_SONY&PROD_PRS-505/UC:MS&REV_1000\\080046100042D42E&
1', 0), (u'USBSTOR\\DISK&VEN_SONY&PROD_PRS-505/UC:SD&REV_1000\\080046100042D42E&
2', 0)]
>>>
-FlyTags
FlyTags is offline   Reply With Quote