[英]How to add the temp directory in Win 7 as a Python variable
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. Win 7中的临时目录为%userprofile%\\AppData\\Local\\Temp
,我想将其作为变量添加到python脚本中,以用于在此处创建文本文件。
However, because of the %
at the beginning, it makes python unable to identify it. 但是,由于开头是%
,它使python无法识别它。 I tried to add double %%
, but that didn't work as well. 我试图添加%%
,但是效果不佳。
What should I do? 我该怎么办?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.