Determine if windows drive letter is hard drive or optical from python?

Wolfgang Strobl news2 at mystrobl.de
Tue May 31 17:30:40 EDT 2005


Magnus Lycka <lycka at carmen.se>:

>Wolfgang Strobl wrote:
>> ...     for drive in string.letters[len(string.letters)/2:]:
>
>Or better...
>......    for drive in string.ascii_uppercase:
>
>string.letters differ with locale, but Windows drives are always
>only A-Z (right?) and just iterating over upper case (or lower)
>seems more clear than to iterate over half of the sum of both...

Ooops. Your're right, of course. In my defense, I could argue that it
was a cut&paste job, from a program written long ago ...

-- 
Thank you for observing all safety precautions



More information about the Python-list mailing list