[Tutor] Fw: Diff for Python

ALAN GAULD alan.gauld at btinternet.com
Sun Apr 6 09:44:35 CEST 2008

forwarding to tutor.
Mark, please use Reply-All for tutor messages...

----- Forwarded Message ----
From: Marc Tompkins <marc.tompkins at gmail.com>
To: Alan Gauld <alan.gauld at btinternet.com>
Sent: Saturday, 5 April, 2008 11:45:47 PM
Subject: Re: [Tutor] Diff for Python

On Sat, Apr 5, 2008 at 3:04 PM, Alan Gauld <alan.gauld at btinternet.com> wrote:
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/20080406/a3c167d5/attachment.htm 

More information about the Tutor mailing list