On May 2, 10:46 am, whitewave <[EMAIL PROTECTED]> wrote: > Is there a way for me to disregard > the newlines and spaces? > > Python 2.3 > WINXP > > Thanks. > Jen
HTH: >> help(difflib.Differ.__init__) Help on method __init__ in module difflib: __init__(self, linejunk=None, charjunk=None) unbound difflib.Differ method Construct a text differencer, with optional filters. The two optional keyword parameters are for filter functions: - `linejunk`: A function that should accept a single string argument, and return true iff the string is junk. The module-level function `IS_LINE_JUNK` may be used to filter out lines without visible characters, except for at most one splat ('#'). It is recommended to leave linejunk None; as of Python 2.3, the underlying SequenceMatcher class has grown an adaptive notion of "noise" lines that's better than any static definition the author has ever been able to craft. - `charjunk`: A function that should accept a string of length 1. The module-level function `IS_CHARACTER_JUNK` may be used to filter out whitespace characters (a blank or tab; **note**: bad idea to include newline in this!). Use of IS_CHARACTER_JUNK is recommended. Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list