John A Meinel <john at arbash-meinel.com> writes:
> Actually, what's interesting is that it seems to work correctly if the
> command in question takes any options.
That's because the processing of option-related help starts with:
outfile.write('\noptions:\n')
notice the initial newline :-)
--Denys