def METHOD_NAME(pathname, verbose=0):
    """Open a resource file given by pathname, possibly decoding an
    AppleSingle file"""
    # No resource fork. We may be on OSX, and this may be either
    # a data-fork based resource file or a AppleSingle file
    # from the CVS repository.
    try:
        refno = Res.FSOpenResourceFile(pathname, u'', 1)
    except Res.Error, arg:
        if arg[0] != -199:
            # -199 is "bad resource map"
            raise
    else:
        return refno
    # Finally try decoding an AppleSingle file
    pathname = _decode(pathname, verbose=verbose)
    refno = Res.FSOpenResourceFile(pathname, u'', 1)