Package schrodinger :: Module structure :: Class FormatReader
[hide private]
[frames] | no frames]

Class FormatReader

                 object --+    
                          |    
_ReaderWriterContextManager --+
                              |
                             FormatReader
Known Subclasses:

This is a base class for all file format readers.

It currently handles the queueing of error messages generated by the underlying file reading libraries.

Instance Methods [hide private]
 
__init__(self, error_handler)
x.__init__(...) initializes x; see help(type(x)) for signature
 
getErrorHandler(self)
This method will return the current error handler.
 
getReadErrors(self)
Returns the list of error messages generated from the reading operations since the most recent clearReadErrors() call.
 
clearReadErrors(self)
Clears the list of read errors.
 
startErrorQueuing(self)
Queue error messages and suppress printing to the stream.
 
stopErrorQueuing(self)
Turn off error queueing and add any error messages to the error_queue attribute.

Inherited from _ReaderWriterContextManager: __enter__, __exit__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, error_handler)
(Constructor)

 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

getErrorHandler(self)

 

This method will return the current error handler. It should be defined in any derived class in order to query the appropriate mmlib and return the error handler if there is one.

getReadErrors(self)

 

Returns the list of error messages generated from the reading operations since the most recent clearReadErrors() call. Note that this could be an empty list if now errors have beenn encountered.

stopErrorQueuing(self)

 

Turn off error queueing and add any error messages to the error_queue attribute. And restore printing to the stream.