How would I go about getting the Windows/System folder paths in python? I need to be able to read from an INI that gets written to the Windows directory.
Use the environment variable %WINDIR%.
import os
winpath = os.environ['WINDIR'] + "\\System\\"
inifile = open(winpath + filename)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With