Return a file-like object that can be used as a temporary storage
area. The file is created using mkstemp(). It will be destroyed as
soon as it is closed (including an implicit close when the object is
garbage collected). Under Unix, the directory entry for the file is
removed immediately after the file is created. Other platforms do not
support this; your code should not rely on a temporary file created
using this function having or not having a visible name in the file
system.
myfile.name
将获得文件路径。注意
tempfile
s在close()
之后不存在。从文档中:来源:http://docs.python.org/2/library/tempfile.html
你不能用这个名字吗
相关问题 更多 >
编程相关推荐