|
Hobbyist Programmer
Join Date: Dec 2007
Location: England
Posts: 169
Rep Power: 1 
|
Re: Listing HD's
Is there a way of doing this properly or would i have to do something like this
drives = ["A:\\", "B:\\", "C:\\", "D:\\", "E:\\", "F:\\", "G:\\", "H:\\", "I:\\", "J:\\", "K:\\", "L:\\", "M:\\", "N:\\", "O:\\", "P:\\", "Q:\\", "R:\\", "S:\\", "T:\\", "U:\\", "V:\\", "W:\\", "X:\\", "Y:\\", "Z:\\"] for drive in drives: if os.path.exists(drive): print drive, "Present" else: print drive, "Not Present"
So is that how i will have to do it, or is there an actual method to do that for you?
Chris
__________________
Who said i couldn't program
sarcasm = raw_input('Type in a sarcastic remark: ')
print sarcasm
|