更新时间:2023-12-05 12:46:28
写入文件不是IronPython独有的. Python文档对此进行了很好的介绍.无论如何:
writing to a file isn't unique to IronPython; the Python docs go over this fairly well. in any case:
f = open('c:\\filename.txt', 'w')
f.write(path)
f.write(analysis)
my_list = ['one','two','three']
for item in my_list:
f.write(item) # write the item's content
f.write('\n') # add a line break (optional)
f.close()
你会没事的.
IronPython是常规Python的派生产品,可以与.NET API(例如Spotfire的API)进行交互.因此,通常您可以通过查看Python资源找到非Spotfire专用的解决方案.
IronPython is a derivative of regular Python that can interact with .NET APIs such as Spotfire's API. thus, you can typically find non-Spotfire-specific solutions by looking at Python resources.