def remove_files(list_of_filepaths, error_on_missing=True):
    """Remove list of filepaths, optionally raising an error if any are missing

    This function is ported from PyCogent (http://www.pycogent.org). PyCogent
    is a GPL project, but we obtained permission from the authors of this
    function to port it to pyqi (and keep it under pyqi's BSD license).
    """
    missing = []
    for fp in list_of_filepaths:
        try:
            remove(fp)
        except __HOLE__:
            missing.append(fp)

    if error_on_missing and missing:
        raise OSError("Some filepaths were not accessible: %s" % '\t'.join(
            missing))
dataset/ETHPy150Open biocore/pyqi/pyqi/util.py/remove_files