Add filter option
improve pydoc, factor out some repeated code for parsing the filters,
strip leading/trailing whitespace from filter names and values
bug fixes:

use string.find instead of string.index because we don't want to throw an error if the substring isn't there

some operators (<, >, <=, >=) imply numeric comparison, so make sure values are numbers