summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--software/python.page18
1 files changed, 17 insertions, 1 deletions
diff --git a/software/python.page b/software/python.page
index 5d05ad8..9675873 100644
--- a/software/python.page
+++ b/software/python.page
@@ -14,7 +14,8 @@ Python PEP-008 <http://www.python.org/dev/peps/pep-0008/>: Style Guide for
Python Code
pylint <http://pypi.python.org/pypi/pylint>, a Python syntax checker. Very
-verbose, use pylint -E or at least pylint -r no.
+verbose, use pylint -E (errors only) or at least pylint -r no (no report). Eg,
+"pylint -r no file.py -d W0614 -d C -d R".
For docstring documentation, refer to
PEP-257<http://www.python.org/dev/peps/pep-0257/> and the Sphinx
@@ -56,6 +57,14 @@ of "Sphinx style". For example:
"""
return 0
+autopep8 is a tool to automatically pep8-ify a file:
+
+ sudo pip install autopep8
+ autopep8 --in-place --select=W293,W191,W291 *.py
+
+pep8radius is sort of similar, but only applies to code that you are going to
+commit (using VCS info).
+
Packaging
-----------
@@ -79,3 +88,10 @@ ASCII
----------------
'ord' is the function that takes a single ASCII character and returns the value
number (as an int).
+
+RunSnakeRun
+-------------
+
+$ python -m cProfile -o ./dump.profile myscript.py --script-option blah
+$ # run to completion or Ctrl-C, then
+$ runsnakerun ./dump.profile