tags:

views:

475

answers:

1

Possible Duplicate:
Is there a way to list all the available drive letters in python?

What's the way to retrieve currently mounted drive list in Windows incl. Thumb drives, and mapped networks.

i currently do

    drives=[]
    for c in string.lowercase:
        if os.path.isdir(c+':'):
         drives.append(c+':')

which looks ugly, but is completely KISS proof :)

+1  A: 
win32api.GetLogicalDriveStrings().split("\x00")
Sanjaya R