[Tutor] PyMOTW: difflib

Dick Moores rdm at rcblue.com
Sun Apr 6 18:33:04 CEST 2008

At 08:24 AM 4/6/2008, Martin Walsh wrote:
>Dick Moores wrote:
> > See < http://blog.doughellmann.com/2007/10/pymotw-difflib.html>
> >
> > And my try with the Differ example,
> > <http://py77.python.pastebin.com/f41ec1ae8>, which also shows the error,
> >
> > "E:\Python25\pythonw.exe" -u "E:\PythonWork\demo_pymotw-difflib.py"
> > Traceback (most recent call last):
> >  File "E:\PythonWork\demo_pymotw-difflib.py", line 12, in <module>
> >    from difflib_data import *
> > ImportError: No module named difflib_data
> >
> > What is difflib_data ?
>It is the example data provided with the PyMOTW tutorial.
>Near the top of the article (from the link you provided) you'll see the
>heading "Test Data". I assume the author wants you to copy and paste the
>source into a new file named difflib_data.py in your working dir.
>Alternatively, it looks like you can download all the source and example
>data for all PyMOTWs in one compressed file:

Thanks very much for figuring that out for me, and so clearly explaining it.

I downloaded that compressed file and found difflib_data.py (see it 
at <http://py77.python.pastebin.com/f5e2c73a5>). Copied the data into 
my demo_pymotw-difflib.py, deleted the line "from difflib_data import 
*", and ran it. See it and the output at 

Dick Moores

UliPad <<The Python Editor>>: http://code.google.com/p/ulipad/ 

More information about the Tutor mailing list