Git Product home page Git Product logo

editorconfig-core-py's Introduction

EditorConfig Python Core

image

image

image

image

EditorConfig Python Core provides the same functionality as the EditorConfig C Core. EditorConfig Python core can be used as a command line program or as an importable library.

EditorConfig Project

EditorConfig makes it easy to maintain the correct coding style when switching between different text editors and between different projects. The EditorConfig project maintains a file format and plugins for various text editors which allow this file format to be read and used by those editors. For information on the file format and supported text editors, see the EditorConfig website.

Installation

With setuptools:

sudo python setup.py install

Getting Help

For help with the EditorConfig core code, please write to our mailing list. Bugs and feature requests should be submitted to our issue tracker.

If you are writing a plugin a language that can import Python libraries, you may want to import and use the EditorConfig Python Core directly.

Using as a Library

Basic example use of EditorConfig Python Core as a library:

from editorconfig import get_properties, EditorConfigError

filename = "/home/zoidberg/humans/anatomy.md"

try:
    options = get_properties(filename)
except EditorConfigError:
    print "Error occurred while getting EditorConfig properties"
else:
    for key, value in options.items():
        print "%s=%s" % (key, value)

For details, please take a look at the online documentation.

Running Test Cases

Cmake has to be installed first. Run the test cases using the following commands:

cmake .
ctest .

Use -DPYTHON_EXECUTABLE to run the tests using an alternative versions of Python (e.g. Python 3):

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

License

See COPYING file for licensing details.

editorconfig-core-py's People

Contributors

treyhunner avatar xuhdev avatar flimm avatar peterdavehello avatar stephengroat avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.