【发布时间】:2019-10-18 00:05:37
【问题描述】:
我正在寻找类似于 R/Python 中的 tempfile 函数的东西: https://docs.python.org/3/library/tempfile.html https://www.rdocumentation.org/packages/base/versions/3.6.1/topics/tempfile
摩泽尔有这种情况吗?
【问题讨论】:
标签: temporary-files mosel
我正在寻找类似于 R/Python 中的 tempfile 函数的东西: https://docs.python.org/3/library/tempfile.html https://www.rdocumentation.org/packages/base/versions/3.6.1/topics/tempfile
摩泽尔有这种情况吗?
【问题讨论】:
标签: temporary-files mosel
您可以使用 I/O 驱动程序“tmp:”在 Mosel 实例的临时目录中创建一个文件,可能结合函数“newmuid”创建一个唯一标识符作为文件名,例如:
tmpfname:="tmp:"+newmuid
fopen(tmpfname, F_OUTPUT)
writeln("This line is written into the temporary file")
fclose(F_OUTPUT)
【讨论】: