class ExceptionFinder(visitor.ASTVisitor):
    """List all exceptions raised by a module. 
    Saved as: http://gist.github.com/402869
    """

def __init__(self, filename):
    visitor.ASTVisitor.__init__(self)
self.filename = filename
self.exns = set()
return

def __visitName(self, node):
    """Should not be called by generic visit, otherwise every name
        will be reported as an exception type.
        """
self.exns.add(node.name)
return

def __visitCallFunc(self, node):
    """Should not be called by generic visit, otherwise every name
        will be reported as an exception type.
        """
self.__visitName(node.node)
return

def visitRaise(self, node):
    """Visit a raise statement.
        Cheat the default dispatcher.
        """
if issubclass(node.expr1, compiler.ast.Name):
    self.__visitName(node.expr1)
elif isinstance(node.expr1, compiler.ast.CallFunc):
    self.__visitCallFunc(node.expr1)
return
Как я могу найти список всех исключений, которые выдает данная библиотечная функция в Python?