Skip to main content

EditorConfig File Locator and Interpreter for Python

Project description

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

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

EditorConfig-0.12.3.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

EditorConfig-0.12.3-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file EditorConfig-0.12.3.tar.gz.

File metadata

  • Download URL: EditorConfig-0.12.3.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0

File hashes

Hashes for EditorConfig-0.12.3.tar.gz
Algorithm Hash digest
SHA256 57f8ce78afcba15c8b18d46b5170848c88d56fd38f05c2ec60dbbfcb8996e89e
MD5 0e31c97e10ec36e1dd00e7db34fc6dad
BLAKE2b-256 13318382c65fb54ef19b8335f8e05e9ed9f62e33122f9619d989a151cc7e5152

See more details on using hashes here.

File details

Details for the file EditorConfig-0.12.3-py3-none-any.whl.

File metadata

  • Download URL: EditorConfig-0.12.3-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0

File hashes

Hashes for EditorConfig-0.12.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6b0851425aa875b08b16789ee0eeadbd4ab59666e9ebe728e526314c4a2e52c1
MD5 da6ba26c0918e5e97c18cb407df5e3ec
BLAKE2b-256 4e04e8a79c1db0c55ef03d53c05c61d06c4d6d3be37ef84e5400ce36b4a0fbe9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page