def safe_remove(file):
        "Convenience function for removing temporary test files"
        try:
            os.remove(file)
        except OSError as err:
            if err.errno != errno.ENOENT:
                raise
Convenience function for removing temporary test files
recipes/Python/580672_Register_exit_function/recipe-580672.py