A simply newbie question about ndiff
Emile van Sebille
emile at fenx.com
Sun Apr 21 20:05:55 EDT 2002
Neville Franks
> I enter 'import difflib' which I assume is necessary and get no
complaints.
> Then if I type 'ndiff' I get: NameError: name 'ndiff' is not defined.
If I
> type: 'ndiff file1 file2' I get: SyntaxError: invalid systax.
>
> I've also tried:
> >>> s = SequenceMatcher( None, "abcd", "bcde" )
> and I get:
> NameError: name 'SequenceMatcher' is not defined.
Those names live in the difflib namespace. When using them like this,
you'll need to prefix them. Try difflib.SequenceMatcher
--
Emile van Sebille
emile at fenx.com
---------
More information about the Python-list
mailing list