I am working on a software installer for my current application. It needs to be installed to the System HDD. How owuld I detect the system drive and return the letter from Python? Would the win32 extensions be useful? How about the os module pre packaged with Python?
This is how to return the letter of the System drive on a Win32 platform:
import os print os.getenv("SystemDrive")
The above snippet returns the system drive letter. In my case ( and most cases on windows) C:
2.1m questions
2.1m answers
60 comments
57.0k users