import win32api
drives = win32api.GetLogicalDriveStrings()
drives = drives.split('\000')[:-1]
print drives
Adapted from:
http://www.faqts.com/knowledge_base/view.phtml/aid/4670
More Related Contents:
- pip install fails with “connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:598)”
- Python – PIP install trouble shooting – PermissionError: [WinError 5] Access is denied
- List running processes on 64-bit Windows
- Get screenshot on Windows with Python?
- PermissionError: [WinError 5] Access is denied python using moviepy to write gif
- Check if a process is running or not on Windows?
- Is it possible to kill a process on Windows from within Python?
- subprocess: deleting child processes in Windows
- No module named ‘pandas._libs.tslibs.timedeltas’ in PyInstaller
- Minimal set of files required to distribute an embed-Cython-compiled code and make it work on any machine
- How to access a file’s properties on Windows?
- How to execute a command prompt command from python
- What user do python scripts run as in windows? [duplicate]
- How to run a python script in the background?
- Install libxml2 and associated python bindings – Windows
- Interacting with program after execution
- Multiprocessing launching too many instances of Python VM
- Why does the Python 2.7 AMD 64 installer seem to run Python in 32 bit mode?
- How can I add python to cmd in windows [closed]
- ‘^’ is ignored by Python – how to escape ‘^’ character in Popen Windows?
- Installing pygraphviz on Windows 10 64-bit, Python 3.6
- Discover missing module using command-line (“DLL load failed” error)
- multiprocessing pool example does not work and freeze the kernel
- Temporary file association for single cmd.exe session
- Running Scapy on Windows with Python 2.7
- Installing lxml, libxml2, libxslt on Windows 8.1
- Trouble installing SciPy on windows
- Python multiprocessing linux windows difference
- How to properly report an exit status in batch?
- How can I stop Python’s csv.DictWriter.writerows from adding empty lines between rows in Windows?