Version 9 (modified by Cas, 10 years ago) (diff)

Add info about gtk unicode, some refs and commit message details

Coding Styles


  • Max line length 119 rather than usual 79. That said, where possible keep to 79.


Mostly follow PEP8 with the following exceptions:

  • Line length (see above)
  • All byte arrays (byte strings, str) should be decoded to strings (unicode strings, unicode) on input and encoded back to byte arrays on output. From Stackoverflow:
    >>> b"abcde"
    >>> b"abcde".decode("utf-8")

Note: PyGTK/GTK+ will accept str (utf8 encoded) or unicode but will only return str. See GTK+ Unicode docs.

  • All path separators used within code should be converted to posix format /, so should not contain \ or \\. This is to prevent confusion when dealing with cross-platform clients and servers.

Python References

Useful links to style guides from other projects:


  • Classes should follow the Ext coding style.
  • Class names should be in CamelCase
  • Instances of classes should use camelCase.

Commit Messages

Mainly based on git commit guidelines

  • If the commit fix/closes a ticket, include the number:

[#1001] Add support for magnet uris

To differentiate commit changes at a glance, commits for specific components can optionally include tags. e.g. WebUI, GTKUI, Console, Blocklist etc.

[#1002] [GTKUI] Fix the files tab context menu not being displayed