obspy.core.event.event.Event.write

Event.write(filename, format, **kwargs)[source]

Saves event information into a file.

Parameters
  • filename (str) – The name of the file to write.

  • format (str) – The file format to use (e.g. "QUAKEML"). See obspy.core.event.catalog.Catalog.write() for a list of supported formats.

  • kwargs – Additional keyword arguments passed to the underlying plugin’s writer method.

Example

>>> from obspy import read_events
>>> event = read_events()[0]  
>>> event.write("example.xml", format="QUAKEML")