[英]Write .pypirc file programmatically
Is there some library available to write a ~/.pypirc
file programmatically? 是否有一些库可用于以编程方式编写
~/.pypirc
文件?
Also, what is the formal spec of its format? 另外,其格式的正式规范是什么? All I've found is this section of the docs:
我所发现的只是文档的这一部分:
https://docs.python.org/3.3/distutils/packageindex.html#pypirc https://docs.python.org/3.3/distutils/packageindex.html#pypirc
That leaves out details like what kinds of whitespace are allowable, whether =
and :
are equivalent or not, and so on. 遗漏了一些细节,例如允许哪些类型的空格,
=
和:
是否相等,等等。
The file is read by distutils/config.py
using RawConfigParser
. distutils/config.py
使用RawConfigParser
读取文件。
So if you want to write it use the same RawConfigParser
. 因此,如果要编写,请使用相同的
RawConfigParser
。 The docs you pointed are the only docs. 您指向的文档是唯一的文档。 The rest could be deduced from the code.
其余的可以从代码中推断出来。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.