Skip to main content

A small wrapper around lib2to3 that provide warnings messages for Python 3 incompatible code.

Project description

# py3kwarn [![Build Status](https://travis-ci.org/liamcurry/py3kwarn.png)][travis]

py3kwarn is a small wrapper around lib2to3 to help write Python3 compatible code. It provides flake8-style warning messages.

Currently requires Python 2.7+.

See the [lib2to3][lib2to3] documentation for information on warning messages.

Pull requests are welcome!

## Usage

py3kwarn test.py

## Usage with vim

To use with vim, check out [my syntastic fork][my-fork] which adds py3kwarn as a syntax checker for python. If you want to use py3kwarn and syntastic with another syntax checker (like flake8), then you will have to add let g:syntastic_python_checkers=[‘flake8’, ‘py3kwarn’] to your vim config.

## TODO

  • An option for friendlier messages would be nice.

  • [A flake8 extension][flake8-ext].

  • Use argparse to add some smarter options.

  • Better docs

  • Make it work with Python 2.6

[my-fork]: https://github.com/liamcurry/syntastic/tree/py3kwarn [travis]: https://travis-ci.org/liamcurry/py3kwarn [flake8-ext]: http://flake8.readthedocs.org/en/latest/extensions.html [lib2to3]: http://docs.python.org/2.6/library/2to3.html#fixers

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

py3kwarn-0.1.tar.gz (3.9 kB view hashes)

Uploaded Source

Built Distribution

py3kwarn-0.1.macosx-10.8-intel.exe (67.8 kB view hashes)

Uploaded Source

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