Index: /trunk/Config.kmk
===================================================================
--- /trunk/Config.kmk	(revision 46543)
+++ /trunk/Config.kmk	(revision 46544)
@@ -1654,9 +1654,59 @@
 ifndef VBOX_BLD_PYTHON
  if1of ($(KBUILD_HOST), win)
-  VBOX_BLD_PYTHON := $(firstword $(rsort $(wildcard $(PATH_DEVTOOLS)/win.x86/python/v*/python$(HOSTSUFF_EXE))) python-not-found.exe)
+  VBOX_BLD_PYTHON := $(firstword $(rsort $(wildcard $(PATH_DEVTOOLS)/win.x86/python/v*/python$(HOSTSUFF_EXE))) \
+  				   python-not-found.exe)
  else
-  VBOX_BLD_PYTHON := python$(HOSTSUFF_EXE)
- endif
-endif
+  VBOX_BLD_PYTHON := $(firstword $(which python$(HOSTSUFF_EXE)) $(which python2.7$(HOSTSUFF_EXE)) \
+                                 $(which python2.6$(HOSTSUFF_EXE)) python$(HOSTSUFF_EXE))
+ endif
+endif
+
+#
+# pylint setup, see http://www.logilab.org/857.
+# Supported are 0.21.0 - 0.25.2, but no 0.26.0.
+#
+# Disabled:
+#   W0301 - Unnecessary semicolon.
+#   W0511 - TODO/XXX/FIXME/+++.
+#   W0603 - Using the global statement.
+#   W0702 - No exception type(s) specified.
+#   W0703 - Catch "Exception".
+#   I0011 - Locally disabling XXXXX.
+#   C0321 - More than one statement on a single line.
+#   R0201 - Method could be a function.
+#
+# Note! Yes, --max-branchs is a typo, but not by me.
+#
+ifndef VBOX_PYLINT
+ VBOX_PYLINT        := $(firstword $(which pylint-2.7) $(which pylint-2.6) $(which pylint))
+ ifdef VBOX_PYLINT
+  VBOX_PYLINT       := $(VBOX_BLD_PYTHON) $(VBOX_PYLINT)
+ endif
+endif
+if !defined(VBOX_WITH_PYLINT) && defined(VBOX_PYLINT)
+ VBOX_WITH_PYLINT := 1
+endif
+VBOX_PYLINT_FLAGS    = --report=n --output-format=parseable --include-ids=y --persistent=n \
+	--rcfile=$(if-expr "$(KBUILD_HOST)" == "win",nul,/dev/null) \
+	--max-line-length=130 \
+	--max-attributes=20 \
+	--max-branchs=50 \
+	--max-statements=100 \
+	--max-returns=100 \
+	--max-public-methods=139 \
+	--max-args=9 \
+	--max-module-lines=4096 \
+	--function-rgx='[a-z_][a-zA-Z0-9_]{2,30}$(DOLLAR)' \
+	--method-rgx='[a-z_][a-zA-Z0-9_]{2,30}$(DOLLAR)' \
+	--argument-rgx='([a-z_][a-zA-Z0-9_]{2,30}|rc|hr|s|c|cx|cy|cb|fn)$(DOLLAR)' \
+	--variable-rgx='([a-z_][a-zA-Z0-9_]{2,30}|rc|hr|s|c|cx|cy|cb|fn)$(DOLLAR)' \
+	--attr-rgx='([a-z_][a-zA-Z0-9_]{2,30}|rc|hr|o)$(DOLLAR)' \
+	--module-rgx='(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+)|(td[A-Z][a-zA-Z0-9]+)|(t(e|)st(-|)[a-zA-Z0-9]+))$(DOLLAR)' \
+	--class-rgx='(td|)[A-Z_][a-zA-Z0-9_]+$(DOLLAR)' \
+	--const-rgx='(g_(k|)[abcdefhmnpilorstu]+[A-Z][a-zA-Z0-9]+|[A-Z_][A-Z0-9_]+|__copyright__|__version__|__file__|__all__)$(DOLLAR)' \
+	--good-names='i,j,k,t,o,c,e,_' \
+	--disable=W0301,W0511,W0603,W0702,W0703,C0321,R0201,I0011 \
+	--ignored-classes=testdriver.vboxcon \
+
 
 # Define the macro for win path conversion.
