Package svnmailer :: Module differ :: Class InternalDiffer

[hide private]

# Class InternalDiffer

source code

    object --+
             |
            InternalDiffer

Differ without an external program call (uses difflib)

Instance Methods | [hide private]

__init__(self) Initialization | source code

iterable

getStringDiff(self, string1, string2, label1, label2=None, date1=`'````'`, date2=`'````'`) creates a diff of two line based strings | source code

iterable

getFileDiff(self, name1, name2, label1, label2=None, date1=`'````'`, date2=`'````'`) creates a diff of two line based files | source code

Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__str__`, `__subclasshook__`

Properties | [hide private]

Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self)
(Constructor)

source code

Initialization

Overrides: object.__init__

### getStringDiff(self, string1, string2, label1, label2=None, date1=`'````'`, date2=`'````'`)

source code

creates a diff of two line based strings

If a string is `None`, it's treated as ""

Parameters:
  - `string1` (`str`) - First string
  - `string2` (`str`) - Second string
  - `label1` (`str`) - Label for first data
  - `label2` (`str`) - Label for second data
  - `date1` (`str`) - Date description for first data
  - `date2` (`str`) - Date description for second data
Returns: iterable
  unified diff lines (maybe a generator)

### getFileDiff(self, name1, name2, label1, label2=None, date1=`'````'`, date2=`'````'`)

source code

creates a diff of two line based files

Parameters:
  - `name1` (`str`) - First file name
  - `name2` (`str`) - Second file name
  - `label1` (`str`) - Label for first data
  - `label2` (`str`) - Label for second data
  - `date1` (`str`) - Date description for first data
  - `date2` (`str`) - Date description for second data
Returns: iterable
  unified diff lines (maybe a generator)