在Delphi中,我可以写3行代码将Str变量写入ini文件。你知道吗
with Tinifile.create('a.ini') do
try
WriteString('sec', 'name', Str)
finally
Free
end;
在Python中,我看到了不好的模块ConfigParser(py2.x),它需要创建对象,创建节,然后写值,然后写ini。。。。不好!你知道吗
可能存在简单的ini处理类?你知道吗
Ini必须适用于Windows:
[sec]
name=data_str
name2=data_str_2
Tags:
您的Delphi代码几乎就是Python中可用的代码。我可以看到两个不同点:
实际上,example from the documentation几乎就是您发布的内容:
相关问题 更多 >
编程相关推荐