pylint
Although I’ve used pychecker for a while to speed up the Python development process, I never got into pylint. But I think it’s a good time now to go through and modernize & streamline the Python codebase a bit. So I’ll be posting pylint usage notes here.
First things first: to get pylint, go to the pylint home page and install it in the usual way.
Then after you set up PYTHONPATH as you would to import a module, you can run it on code. So far, I have only used it in the most basic way
- Check errors: pylint -e {module}.py
- Full report: pylint {module}.py
I understand there’s a great deal of customization possible, but I’m going to live with the defaults for a while and see where that gets me. Some things in my code that in general need to be changed are:
- methods named doSomething() should be renamed do_something(). I like this convention better anyways.
- I use a global ‘log’ object; pylint wants globals like that to be capitalized. I tried it and kinda like it. So, log.info(”foo”) becomes LOG.info(”foo”)
- Short variable names generate warnings. This is particularly evident in exception handling, where I use the variable ‘E’ for the exception object. I think it is fine to change this to ‘err’.
- Undocumented methods generate warnings. No problem there.
- Instance attributes initialized outside the constructor. This is just bad practice, so thanks pylint.
Look for the ‘pylint’ tag for updates

I’ve been following your article but how do I run PYTHONPATH on code?
I think the whole camel case thing started because compilers at the time had limited space (some were max 16 chars or thereabouts) and it was pre-oo so names got long (think of it as manual name munging) so you could shorten name lengths without sacrificing readability.
Now it’s just taste. I find camel case easier to read and underscores seem very old-school to me.
I think camel case was such an obvious option, and so prevalent in other parts of life (e.g. MacGuyver, NaCl) that it would be hard to say it “started” any one place. Perhaps the strongest earliest proponent was Hungarian notation. I find it easier_to_read_underscores_thanSmushedTogetherWords, but I haven’t seen any studies showing that this is universal — a great HCI student project, if you ask me.