under Linux I put my configs in “~/.programname”. Where should I place it in windows?
What would be the recommendated way of opening the config file OS independent in python?
Thanks!
Nathan
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Try:
On linux this will return:
On windows this will return:
Which is a little ugly, so you’ll probably want to do this:
EDIT: For what it’s worth, the following apps on my Windows machine create their config folders in my
Documents and Settings\userfolder:EDIT 2: Oh wow, I just noticed I put
/user/.programnameinstead of/home/user/.programnamefor the linux example. Fixed.