set_options
set_options(self, *, display_max_items=_unchanged, show_progress=_unchanged)Set global options for MIKE IO.
Can be used to change options for the rest of the session, or as a context manager to change them temporarily.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| display_max_items | int | None | Maximum number of items listed when printing a Dataset or a dfs file, by default 10. Remaining items are summarized on a single line. Use None to list all items, or 0 to print only the number of items. | _unchanged |
| show_progress | bool | Show a progress bar while reading or writing many timesteps, by default False. | _unchanged |
Examples
>>> import mikeio
>>> mikeio.set_options(display_max_items=100) # for the rest of the session
>>> ds = mikeio.read("sw_points.dfs0")
>>> with mikeio.set_options(display_max_items=None):
... print(ds)
>>> with mikeio.set_options(show_progress=True):
... ds = mikeio.read("big.dfsu")See Also
get_options