You can write Brian's suggestion without the try:
.
from contextlib import suppresswith suppress(IOError), open('filename'): process()
suppress
is part of Python 3.4. In older releases you can quickly write your own suppress:
from contextlib import contextmanager@contextmanagerdef suppress(*exceptions): try: yield except exceptions: pass