[Tutor] Diff for Python

Marc Tompkins marc.tompkins at gmail.com
Sun Apr 6 00:47:09 CEST 2008

Sorry - forgot to reply to the list the first time...
On Sat, Apr 5, 2008 at 3:04 PM, Alan Gauld <alan.gauld at btinternet.com>

> On Windows you can use FC - File Compare.
> Its not as powerful as diff but it will highlight differences.

On Windows, I've tried a bunch of diff tools - it's probably the way my
brain is wired, but I generally find it harder to understand what the diff
tool is telling me than it would have been to print out the damn files and
compare them on paper.  I feel like I'm being given clues so I can work out
the puzzle myself... if I wanted that, I would do a crossword, not use a
software tool.

So my tool of choice (since I discovered it about three months ago) is the
Compare plugin in Notepad++.  It simply displays the files in separate child
windows, forcibly aligns them with "soft" newlines, and synchronizes the
windows' scrollbars to keep them lined up side by side.  It also shades the
lines in different colors depending on whether the lines are the same in
both files, or one file has a line that the other doesn't, or both files
have the line but different versions.  None of this is new, of course, but
I've never used a tool before that got it all so _right_ and made it so
simple to use and to read.  (Open two or more files in the editor, hit
Alt-D, read.  If necessary, cut and paste between the windows - hit Alt-D
again to resync - read.)

I'm sure there are more sophisticated choices.  Honestly, I sometimes feel a
little guilty using it, 'cause I think I ought to be working harder...  I'm
sure that both vi and emacs do this in a way that mere mortals such as I
cannot appreciate, but I think you must have had to start using either vi or
emacs at a very early age to be able to enjoy the experience.  I'm putting
on my flame-retardant Nomex suit as I type this.

(Tying this thread in with one from last week...)
As a general-purpose Windows editor, I definitely recommend Notepad++.
(It's free, but I moved to it from TextPad, in which I had invested $50.  If
you knew me, you'd know what high praise this is for Notepad++.)  For Python
/ wxPython development, though, I love me some SPE.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20080405/dc14a33b/attachment.htm 

More information about the Tutor mailing list