The temp directory in win 7 is %userprofile%\AppData\Local\Temp and I'd like to add it to a python script as a variable to be used to create a text file there.
However, because of the % at the beginning, it makes python unable to identify it. I tried to add double %%, but that didn't work as well.
What should I do?
You should use the
tempfilemodule instead:This is the platform-independent way to have a temporary file.