HFST - Helsinki Finite-State Transducer Technology - Python API  version 3.12.1
 All Classes Namespaces Files Functions Variables Pages
List of all members
StreamIsClosedException Class Reference

Stream is closed. More...

Inheritance diagram for StreamIsClosedException:
HfstException

Additional Inherited Members

- Public Member Functions inherited from HfstException
def what
 A message describing the error in more detail. More...
 

Detailed Description

Stream is closed.

Thrown by hfst.HfstTransducer.write_att hfst.HfstOutputStream.write

An example:

 try:
     tr = hfst.regex('foo')
     outstr = hfst.HfstOutputStream(filename='testfile')
     outstr.close()
     outstr.write(tr)
 except hfst.exceptions.StreamIsClosedException:
     print("Could not write transducer: stream to file was closed.")

The documentation for this class was generated from the following file: