[Tutor] Drive listing
Ole Jensen
learning.python at dbmail.dk
Tue Aug 31 23:05:31 CEST 2004
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
anything.
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
More information about the Tutor
mailing list