'Parse options up to the subcommand argument. Returns a tuple
of the options object and the remaining arguments.'

def parse_global_options(self, args):

    (options, subargs) = self.parse_args(args)
    if options.help:
        subargs = ['help']
    elif options.version:
        subargs = ['version']
    return (options, subargs)
