[Tutor] Drive listing

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


You need win32all, get it here
http://starship.python.net/crew/mhammond/

Then see here
http://groups.google.com/groups?selm=mailman.1011113008.15423.python-list%40python.org
and here
http://insom.me.uk/blog/Tech/Python/getdrives.writeback

Kent

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
>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
>
>_______________________________________________
>Tutor maillist  -  Tutor at python.org
>http://mail.python.org/mailman/listinfo/tutor



More information about the Tutor mailing list