def attribute_getter(obj, attribute_name):
    def f():
        "getter for %s" % attribute_name
        attr_buffer = create_string_buffer(1024)
        c(drmaa_get_attribute, obj, attribute_name, attr_buffer,
          sizeof(attr_buffer))
        return attr_buffer.value
    f.__name__ = 'get_' + attribute_name
    return f
returns a drmaa attribute setter
dataset/ETHPy150Open pygridtools/drmaa-python/drmaa/helpers.py/attribute_getter