Python Scripting

Formatting

PEP 8

PEP 8 is the coding style adhered to by python developers for the python binaries and standard library code. You can read the guide in its entirety, or as a helpful summary with examples.

Main Highlights

The autopep8 package "automatically formats Python code to conform to the PEP 8 style guide".

In the Atom IDE, compliance can be set with the following steps: 1. Setting/ Preferences > Packages > Search “language-python” > Settings > Python Grammar > Tab Length > Set to “4” 2. Setting/ Preferences > Editor > Tab Type > Set to “Soft”

Last updated