swc-installation-test-2.py: Initial EditorTaskDependency implementation

I'm not sold on this idea...
swc-installation-test-2.py: Add 'EasyMercurial'

Chris Cannam just released v1.3.0 which adds a --version option for
easy version testing [1].

[1]: https://bitbucket.org/cannam/easyhg/issue/1/teach-easymercurial-the-version-option
swc-installation-test-2.py: Add 'argparse'

I use this module (which entered the stdlib in 2.7/3.2) in my
get-my-ip.py script (in a different branch at the moment).  Users with
older Python implementations will have to install an external module
(e.g. from PyPI).
swc-installation-test-1.py: Link to s-c.o's terminal.html

For screen shots and additional platform support.
swc-installation-test-2.py: Add support for package-specific URLs

To give users more targeted advice for fixing their installation
problems, we should link them to somewhere more specific than the root
SWC setup page.  The two knobs in the specific URL are system/OS
(Gentoo, Debian, OS X, MS Windows, ...) and package (the dependency
name: emacs, git, virtual-browser, ...).  We don't have consistent
URLs upstream yet [1], but maybe this commit will help motivate them
;).

[1]: https://github.com/swcarpentry/website/issues/2
swc-installation-test-2.py: List supported Ubuntu install hints

From http://software-carpentry.org/setup/ubuntu.html, in the order
that they are currently listed.  The page sections don't have the
appropriate anchor IDs yet, but it's still better to link to the
Ubuntu page than to the root setup/ page.
swc-installation-test-2.py: Add --help and --verbose

The system information is useful for troubleshooting a student's
installation problems, but it is probably less useful for the student
themselves.  Turn off this troubleshooting information by default and
require the --verbose option to re-enable it.

If we didn't have to maintain support for Python 2.6, we could use
argparse instead of optparse.  The optparse module is deprecated for
2.7, 3.2, and later, but it is still part of the stdandard library.

Also update the README to point out --verbose.
swc-installation-test-2.py: Link directly to install docs

Expecting the Software Carpentry maintainers to keep up-to-date
documentation for each system/package pair is not realistic.  Instead,
link to each package's installation instructions (as best I can find
them).  The system/version/package globbing (using fnmatch, see
glob(7)) makes it easy to setup per-system and per-version URLs if you
want to fine-tune the instructions.
swc-installation-test-2.py: Add 'safari'

This works adds support for virtual-browser on OS X.  Matt Davis
reports the locations of Firefox and Chrome as:

  /Applications/Firefox.app
  /Applications/Google\ Chrome.app

but I'm not sure where the executables live underneath those
directories, which we'd probably need if we wanted to extract version
numbers.
swc-installation-test-2.py: Don't override Popen's 'close_fds'

Or 'shell'.  The support for these options can be flaky, and the
defaults change with Python version depending on what is best
supported [1].

[1]: http://docs.python.org/2/library/subprocess.html#subprocess.Popen

Reported-by: Ethan White <ethan@weecology.org>
swc-installation-test-2.py: Raise an error on empty version stream

This makes the upcoming mult-path checking easier to implement.
swc-installation-test-2.py: Use _ROOT_PATH for MS Windows compatability

I don't think starting a path with os.sep gives you a root path on
Windows.  We need the backslash in _ROOT_PATH, because:

  os.path.join('c:', 'foo')

gives 'c:foo', a path relative to the current directory on drive C: [1].

[1]: http://docs.python.org/3/library/os.path.html#os.path.join
swc-installation-test-2.py: Add CommandDependency.paths fallbacks

The old CommandDependency implementation assumed that commands would
exist in one of the directories listed in PATH.  This assumption is,
unfortunately, often not satisfied on MS Windows or OS X.  In order to
work around this problem, you can now store a list of fallback paths
that will be tried if there is an error extracting the version stream
from the bare CommandDependency.command.

I've added fallback paths for Notepad++, Firefox, and Google Chrome,
as reported by Ethan White for Windows 7.
swc-installation-test-2.py: Also look for extension-less paths

Before this commit, CommandDependency checked self.command (with an
optional extension determined by distutils).  If that check failed to
produce a version stream, we cycled through a list of additional
hard-coded paths.  For example:  Notepad++ used:

  self.command = 'notepad++'
  self.paths = [
      _os.path.join(
          _ROOT_PATH, 'Program Files', 'Notepad++', 'notepad++.exe'),
      ]

Because some MS Windows commands lack the expected '.exe' extension,
but are still present and detected by a number of shells, we should
also look for the extension-less version of the command.

I consolidated the _get_version_stream() logic to build a single list
of paths and loop through it looking for success (and accumulating
errors).  This makes the handling of self.paths less of a special
case, and sets us up for any additional path mangling we may need to
support other poorly standardized OSes ;).
swc-installation-test-2.py: Use ProgramFiles environment variable

On Fri, Apr 26, 2013 at 11:45:12AM -0700, Onno Broekmans wrote:
> ... the installation paths you mention are incorrect for the
> majority of modern Windows 7 installations. These are 64-bit
> installations, and they have a special folder for 32-bit programs:
> "C:\Program Files (x86)". So Notepad++ can be found in:
>
>     C:\Program Files (x86)\Notepad++\notepad++.exe
>
> In the script, you could just check for the program's existence
> using both paths ("C:\Program Files" _and_ "C:\Program Files
> (x86)"), or you could use the "ProgramFiles" environment variable.

Environment variable it is!  From the Microsoft docs [1]:

  CSIDL_PROGRAM_FILESX86
    The Program Files folder on 64-bit systems. A typical path is
    C:\Program Files(86).
  ...
  CSIDL_PROGRAM_FILES
    Version 5.0. The Program Files folder. A typical path is
    C:\Program Files.
  ...
  PROGRAMFILES
    Same as CSIDL_PROGRAM_FILES.
  PROGRAMFILES(X86)
    Refers to the C:\Program Files (x86) folder on 64-bit systems.

We're just looking for executables, so it would be ok if we found a
32-bit Notepad++ or a 64-bit Notepad++.  With this commit, we check
both locations (if there are two distinct locations).

[1]: http://technet.microsoft.com/en-us/library/cc749104%28v=ws.10%29.aspx
Initializing template for Software Carpentry bootcamp home pages.
Cleaning up description of how to create bootcamp home page, and bringing files into sync with revised description.
Describing the 'orgs' and 'people' directories.
1.   Renaming the instructors' guide sections to make intention clearer.
2.   Adding `lessons/index.html` to explain what each lesson section is for.
3.   Adding more explanatory notes to `README.md`.
Bringing Makefile into line with Jekyll 1.1.0