Open/Select files to compare

The dialog for opening files looks like this:

/docs/compare-tool/open/open-dialog.png

It consists of two places where a filename can be entered, selected from a dropdown list of files used earlier, or looked up using a file dialog (after pressing the Browse button); and a series of radio buttons indicating the comparison methods possible.

Currently the following methods are available:

  • "classic" ini files consisting of section headers followed by option lines, like this:

/docs/compare-tool/open/ini-example.png
  • the same, but allowing for a file that doesn't start with a section header

  • XML files - with this method element names are first sorted and similar elements are sorted on the value of one of their attributes. If there's an attribute name like "id" or "name" available, this will be used in the sorting. Also, this assumes that similar elements have the same set of attributes.

When during comparison an error occurs, a message pops up containing a traceback (because I don't like applications guessing what might be the problem). Two examples of such a situation:

/docs/compare-tool/open/missing-sectionheader-error.png

This message will popup when a "strict" ini comparison is done involving a file that does not start with a section header

/docs/compare-tool/open/missing-sectionheader-error.png

This message will popup when an XML comparison is done involving a file that doesn't contain valid XML.