Answer the question
In order to leave comments, you need to log in
How to find out logical drives in a Python script?
Hello. I'm interested in the following question - how to find out logical drives in a Python script?
I have the following solutions -
1. Use IronPython. .NET has corresponding functions for getting logical drives.
2. Iterate over the letters of the English alphabet and see when exceptions are thrown.
But these options are not very suitable.
Thanks in advance.
Answer the question
In order to leave comments, you need to log in
Here on C#
computerid.codeplex.com/SourceControl/latest#Compu...
UPD:
You can learn purely in python using the os module
import os
print os.getenv("SystemDrive")
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question