read_result¶
Python reference for nagasim.twin.read_result.
The latest result a twin wrote into directory.
The one reader, for a second process: bounded before it is parsed, whole because the
writer replaces the file, and trusted for nothing beyond its format.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
directory
|
str or Path
|
The folder a twin writes into ( |
required |
Returns:
| Type | Description |
|---|---|
tuple
|
|
See Also
nagasim.twin.forecast_from_state : The runner that makes the forecast in a result.
Examples:
>>> import tempfile
>>> from nagasim import twin
>>> with tempfile.TemporaryDirectory() as folder:
... doc, problems = twin.read_result(folder)
>>> doc is None
True
>>> problems[0].code
'E_TWIN_RESULT'