def get_win_drives():
 assert NT
 drives = []
 bitmask = windll.kernel32.GetLogicalDrives()
 for letter in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ':
  if ((bitmask & 1) and (win32file.GetDriveType(('%s:\\' % letter)) in DRIVES)):
   drives.append(letter)
  bitmask >>= 1
 return drives

def get_win_drives ( ) : assert NT drives = [ ] bitmask = windll . kernel32 . GetLogicalDrives ( ) for letter in 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' : if ( ( bitmask & 1 ) and ( win32file . GetDriveType ( ( '%s:\\' % letter ) ) in DRIVES ) ) : drives . append ( letter ) bitmask >>= 1 return drives
return list of detected drives .