piranha/opster — pull request #24 by oscarbenjamin (2012-04-25 18:41:26+00:00)
Title: Fix preparsing by using getopt.getopt

Ok, so this patch keeps the tests and everything from the patch in GH-23 but it uses ``getopt`` again and actually reduces the number of lines in ``opster.py``.

It turns out preparsing should just use ``getopt`` instead of ``gnu_getopt``. This way options are only parsed up to the first non-option argument (the subcommand name). If only global options are allowed before the command, name then it will be able to parse those arguments without error.