def action_around(self, path):
            """Read file and pass its content on; report success or error."""
            print('opening file %r...' % path)
            try:
                with open(path) as f:
                    content = f.read()
            except EnvironmentError:
                print(sys.exc_info()[1])
            else:
                result = self.__action_around(path, content)
                print('file %r processed successfully' % path)
                return result
Read file and pass its content on; report success or error.
recipes/Python/577859_CLOSlike_aroundbeforeafter_auxiliary/recipe-577859.py