class_docstr: Manage a collection of events and a sequence of callbacks for each.
  
  This is attached to :class:`~IPython.core.interactiveshell.InteractiveShell`
  instances as an ``events`` attribute.
  
  .. note::
  
     This API is experimental in IPython 2.0, and may be revised in future versions.
class_docstr_tok: ["Manage","a","collection","of","events","and","a","sequence","of","callbacks","for","each",".","This","is","attached","to",":","class",":","`","~IPython.core.interactiveshell.InteractiveShell","`","instances","as","an","``","events","``","attribute",".","..","note",":",":","This","API","is","experimental","in","IPython","2.0",",","and","may","be","revised","in","future","versions","."]
docstr: Call callbacks for ``event``.
  
  Any additional arguments are passed to all callbacks registered for this
  event. Exceptions raised by callbacks are caught, and a message printed.
docstr_tok: ["Call","callbacks","for","``","event","``",".","Any","additional","arguments","are","passed","to","all","callbacks","registered","for","this","event",".","Exceptions","raised","by","callbacks","are","caught",",","and","a","message","printed","."]
code: def trigger(self, event, *args, **kwargs):
      """Call callbacks for ``event``.
  
      Any additional arguments are passed to all callbacks registered for this
      event. Exceptions raised by callbacks are caught, and a message printed.
      """
      for func in self.callbacks[event][:]:
          try:
              func(*args, **kwargs)
          except Exception:
              print(
                  "Error in callback {} (for {}):".format(func, event)
              )
              self.shell.showtraceback()
  
file_path: catboost/contrib/python/ipython/py2/IPython/core/events.py
imports: from __future__ import print_function
label_desc: Use image node_id 4 for calling the EventManager obj's underlying member method code with example usage: obj.trigger(event) without return types