def generic_copy(source, target, string=''):
    """ copy attributes from source to target that have string in them """
    for attr in dir(source):
        if attr.find(string) > -1:
            try:
                setattr(target, attr, getattr(source, attr))
            except:
                pass
    return
