How do I dynamically generate a file name in python?
This question already has an answer here:
既然你只需要用户名:
import getpass
user = getpass.getuser()
fname = "com.strange.things." + user + ".more.strange.things"
链接地址: http://www.djcxy.com/p/79426.html
上一篇: 如何根据用户名更改目录?
下一篇: 我如何在python中动态生成文件名?