[Tutor] Drive listing

Kent Johnson kent_johnson at skillsoft.com
Wed Sep 1 13:02:02 CEST 2004

You need win32all, get it here

Then see here
and here


At 11:05 PM 8/31/2004 +0200, Ole Jensen wrote:
>How is it possiple to list the drives on a current system? is there som
>module that will output this some thing like listdrives() ? I have
>browsed the Global Module Index for relating functions but haven't found
>Or would I need to create my own function? something similiar to.
>Not testet:
>from os.path import exists
>from string import  ascii_lowercase as lcase
>def drive():
>     for i in lcase:
>         drive = i + ':/'
>         drives = []
>         if exists(drive):
>            drives.append(drive)
>     return drives
>Ole Jensen
>Tutor maillist  -  Tutor at python.org

More information about the Tutor mailing list