Our source code style based on PEP-8.
- max. line length: 110 characters.
- No Python shebang! (Only needed in the dispatcher files)
- Source code encoding always utf-8 (lower)
- copyleft info:
- copyleft not copyright ;)
- always by "the PyLucid team" (New authors should be inserted in AUTHORS file!)
- you can insert author info (like "based on sourcecode by..." or "created by...") into the normal header DocString.
- We use GPL v3 or above
- no TABs, use only 4 spaced to indent
- We use linux like line endings: "\n"
The source code header should look like this:
# coding: utf-8
Some Info about the file.
:copyleft: 2011 by the PyLucid team, see AUTHORS for more details.
:license: GNU GPL v3 or above, see LICENSE for more details.
PyDev code formatter settings
Window -> Preferences -> Pydev -> Editor -> Code Style -> Code Formatter
One of the important switch to enable is:
- On save, only apply formatting in changed lines?