[Tutor] Commenting lines in modified files

Kent Johnson kent_johnson at skillsoft.com
Fri Nov 5 10:57:24 CET 2004


I don't know how you can just look at a saved file and tell what has 
changed. A function like that would have to be integrated into the editor.

If you want to compare the edited file against an unchanged original, the 
SequenceMatcher class in difflib can help a lot with this.


At 09:31 AM 11/5/2004 +0000, Joseph Odegbami wrote:
>I am quite new to Python, have written a few useful parsers and have found
>it very powerful indeed.
>However, working on XEDIT on MVS I came across a macro that add comments to
>lines in a file that has just been modified.
>Now, I thought it will be a very good idea to have something similar in a
>PC environment.
>You open a source file, modify it and run a python script against it to
>indicate all the lines that have just been modified with a preassigned
>Is there anything in Python out there that does something similar or that I
>can start from to implement such, or any ideas that you have will be
>very much appreciated as I don't even know where to begin.
>Best Regards,
>Tutor maillist  -  Tutor at python.org

More information about the Tutor mailing list