Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get the path to the %APPDATA% directory in Python?

Tags:

python

appdata

How can I get the path to the %APPDATA% directory in Python?

like image 495
fox Avatar asked Nov 01 '12 19:11

fox


People also ask

What is the path to AppData?

AppData is a hidden folder located in C:\Users\<username>\AppData. The AppData folder contains custom settings and other information needed by applications.

How do I get to the AppData command?

Press the Windows logo key + R to launch the “Run” App. In the Run app, type %temp% and hit enter. This will open the temporary files folder in the AppData app. Now, press “Ctrl + A” on your computer to select all the temporary files.


1 Answers

import os print os.getenv('APPDATA') 
like image 112
Jon Clements Avatar answered Oct 06 '22 00:10

Jon Clements