用于python的editorconfig文件定位器和解释器

EditorConfig的Python项目详细描述


https://img.shields.io/pypi/v/EditorConfig.svghttps://img.shields.io/pypi/wheel/EditorConfig.svghttps://img.shields.io/pypi/pyversions/EditorConfig.svghttps://secure.travis-ci.org/editorconfig/editorconfig-core-py.svg?branch=master

editorconfig python core提供的功能与 EditorConfig C Core。 editorconfig python core可以用作命令行程序或 可导入库。

editorconfig项目

editorconfig使得在切换时很容易保持正确的编码风格 在不同的文本编辑器之间和不同的项目之间。这个 editorconfig项目维护各种文本的文件格式和插件 允许这些编辑器读取和使用此文件格式的编辑器。为了 有关文件格式和支持的文本编辑器的信息,请参见 EditorConfig website

安装

使用设置工具:

sudo python setup.py install

获取帮助

有关editorconfig核心代码的帮助,请写信给我们的mailing list。错误和功能请求 应该提交给我们的issue tracker

如果您正在编写一个插件一种可以导入python库的语言,那么 可能需要直接导入和使用editorconfig python核心。

用作库

使用editorconfig python core作为库的基本示例:

fromeditorconfigimportget_properties,EditorConfigErrorfilename="/home/zoidberg/humans/anatomy.md"try:options=get_properties(filename)exceptEditorConfigError:print"Error occurred while getting EditorConfig properties"else:forkey,valueinoptions.items():print"%s=%s"%(key,value)

有关详细信息,请查看online documentation

运行测试用例

Cmake必须先安装。运行测试用例 使用以下命令:

cmake .
ctest .

使用-DPYTHON_EXECUTABLE使用 Python(如Python3):

cmake -DPYTHON_EXECUTABLE=/usr/bin/python3 .
ctest .

许可证

有关许可的详细信息,请参见复制文件。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java楼梯的最大高度   java Jackson从1.7.1更新到2.8.6 JsonTypeInfo子类型反序列化   Spring WebApp中的java JPA异常处理   java在SwingWorker(doInBackground)中从WorkerThread调用多个方法?   java Android Studio构建到jar   java是添加多个按钮组的更有效方法   java MySQL JDBC连接池最大大小   java如何防止元素<Integer>变成元素<Object>   Java:处理大型XML文件提取数据而不编写状态自动机?   SpringBoot和React Web应用程序中CAS的java重定向问题   需要java算法方面的帮助吗   java在JDK 16中使用PowerMock   java异常错误本机方法签名   在Java Android中将JSON映射到数组/对象   如何打开一个窗口。java程序中的dat文件   java应用程序引擎+Maven+热插拔   java Moxy的getValueByXPath为除根元素以外的所有元素返回null