用于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为什么这一行是charg=(char)(br.read());被跳过?   java三重DES中的IV在哪里?   java Lombok注释不在Intellij idea下编译   java为什么我不能使用过滤器作为流中的最后一步   sqlite Java编译错误找不到符号方法next()   在Java中解析处理对int来说太大的数字   java摄像头不工作   java是“断言错误”好的做法?   java确定api请求是来自CURL还是POSTMAN?   JavaSpringMVC导航   java使单例模式代码更强大   当Java(解释器)区分大小写时,为什么Java编译器(javac)不区分大小写?   java注释字符串[]oneArr();vs字符串[][]twoArr();公告   java命名查询的利弊   java使用log4jweb在web应用程序中配置Log4j2。罐子   java正则表达式查找以开头和结尾的所有可能出现的文本~   java从字符串执行方法