4.6.9. pde.tools.output module¶
Python functions for handling output
returns a class that behaves as progress bar. |
|
displays a progress bar when iterating |
|
checks whether we are in a jupyter notebook |
|
class that writes text line to stdout |
|
class that writes text lines as html in a jupyter cell |
- class BasicOutput(stream=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>)[source]¶
Bases:
OutputBase
class that writes text line to stdout
- Parameters
stream – The stream where the lines are written
- class JupyterOutput(header: str = '', footer: str = '')[source]¶
Bases:
OutputBase
class that writes text lines as html in a jupyter cell
- Parameters
- class SimpleProgress(iterable=None, *args, **kwargs)[source]¶
Bases:
object
indicates progress by printing dots to stderr
- display_progress(iterator, total=None, enabled=True, **kwargs)[source]¶
displays a progress bar when iterating
- Parameters
- Returns
A class that behaves as the original iterator, but shows the progress alongside iteration.
- get_progress_bar_class() Type[SimpleProgress] [source]¶
returns a class that behaves as progress bar.
This either uses classes from the optional tqdm package or a simple version that writes dots to stderr, if the class it not available.