Code Conventions

Coding Style

ChimeraX uses Python 3.

Python code should follow the Python Style Guide: PEP 8.

Documentation Strings should follow Python’s documentation style given in Chapter 7 of the Python Developer’s Guide. So use reStructuredText (reST) as extended by Sphinx.

Editor defaults

From <>: All python files should have the following modeline at the top:

# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4:

But modelines are a security risk, so put:

au FileType python setlocal tabstop=8 expandtab shiftwidth=4 softtabstop=4

in your .vimrc as well.