A simply newbie question about ndiff

Neville Franks nospam-readonly at getsoft.com
Sun Apr 21 20:32:21 EDT 2002


"Emile van Sebille" <emile at fenx.com> wrote in message
news:DtIw8.49773$HH5.4310 at rwcrnsc51.ops.asp.att.net...
> 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

Hi Emile, Thanks that resolved my problem with SequenceMatcher but I still
can't get ndiff to work. If I enter: 'difflib.ndiff' I get 'AttributeError:
'difflib' module has no attribute 'ndiff''

Is there a way to bring the difflib namespace into the normal? namespace.

--
Neville Franks, Author of ED for Windows - http://www.getsoft.com





More information about the Python-list mailing list