def retOptionMap(theOptParser, theOpts):
    """Returns map of {opt_name : (value, help), ...} from the current options."""
    varsOpts = vars(theOpts)
    retMap = {}
    for k in sorted(theOptParser._option_string_actions.keys()):
        optDest = theOptParser._option_string_actions[k].dest
        optName = '/'.join(theOptParser._option_string_actions[k].
            option_strings)
        try:
            optValue = varsOpts[optDest]
            if hasattr(theOptParser._option_string_actions[k], 'help'):
                optHelp = theOptParser._option_string_actions[k].help.replace(
                    '[default: %(default)s]', '')
                retMap[optName] = optValue, optHelp
        except KeyError:
            pass
    return retMap
