# {py:mod}`phystool.helper` ```{py:module} phystool.helper ``` ```{autodoc2-docstring} phystool.helper :allowtitles: ``` ## Module Contents ### Classes ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`ContextIterator ` - ```{autodoc2-docstring} phystool.helper.ContextIterator :summary: ``` * - {py:obj}`Klass ` - ```{autodoc2-docstring} phystool.helper.Klass :summary: ``` * - {py:obj}`Evaluation ` - ```{autodoc2-docstring} phystool.helper.Evaluation :summary: ``` ```` ### Functions ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`terminal_yes_no ` - ```{autodoc2-docstring} phystool.helper.terminal_yes_no :summary: ``` * - {py:obj}`silent_keyboard_interrupt ` - ```{autodoc2-docstring} phystool.helper.silent_keyboard_interrupt :summary: ``` * - {py:obj}`greptex ` - ```{autodoc2-docstring} phystool.helper.greptex :summary: ``` * - {py:obj}`lower_ascii ` - ```{autodoc2-docstring} phystool.helper.lower_ascii :summary: ``` * - {py:obj}`bat ` - ```{autodoc2-docstring} phystool.helper.bat :summary: ``` * - {py:obj}`as_valid_filename ` - ```{autodoc2-docstring} phystool.helper.as_valid_filename :summary: ``` * - {py:obj}`progress_bar ` - ```{autodoc2-docstring} phystool.helper.progress_bar :summary: ``` ```` ### Data ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`logger ` - ```{autodoc2-docstring} phystool.helper.logger :summary: ``` ```` ### API ````{py:data} logger :canonical: phystool.helper.logger :value: > 'getLogger(...)' ```{autodoc2-docstring} phystool.helper.logger ``` ```` ````{py:function} terminal_yes_no(prompt: str) -> bool :canonical: phystool.helper.terminal_yes_no ```{autodoc2-docstring} phystool.helper.terminal_yes_no ``` ```` ````{py:function} silent_keyboard_interrupt(func) :canonical: phystool.helper.silent_keyboard_interrupt ```{autodoc2-docstring} phystool.helper.silent_keyboard_interrupt ``` ```` ````{py:function} greptex(query: str, path: pathlib.Path, silent: bool) -> set[str] :canonical: phystool.helper.greptex ```{autodoc2-docstring} phystool.helper.greptex ``` ```` ````{py:function} lower_ascii(txt: str) -> str :canonical: phystool.helper.lower_ascii ```{autodoc2-docstring} phystool.helper.lower_ascii ``` ```` ````{py:function} bat(path: pathlib.Path, title: str) -> None :canonical: phystool.helper.bat ```{autodoc2-docstring} phystool.helper.bat ``` ```` ````{py:function} as_valid_filename(txt: str) -> str :canonical: phystool.helper.as_valid_filename ```{autodoc2-docstring} phystool.helper.as_valid_filename ``` ```` `````{py:class} ContextIterator(iterable: typing.Iterable[T], before: int, after: int) :canonical: phystool.helper.ContextIterator ```{autodoc2-docstring} phystool.helper.ContextIterator ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} phystool.helper.ContextIterator.__init__ ``` ````{py:method} get() -> list[T] :canonical: phystool.helper.ContextIterator.get ```{autodoc2-docstring} phystool.helper.ContextIterator.get ``` ```` ````` `````{py:class} Klass(uuid: str, name: str, year: int, extra: str, evaluations: list[str]) :canonical: phystool.helper.Klass ```{autodoc2-docstring} phystool.helper.Klass ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} phystool.helper.Klass.__init__ ``` ````{py:method} is_current() -> bool :canonical: phystool.helper.Klass.is_current ```{autodoc2-docstring} phystool.helper.Klass.is_current ``` ```` ````{py:method} to_dict() -> dict[str, str | list[str] | int] :canonical: phystool.helper.Klass.to_dict ```{autodoc2-docstring} phystool.helper.Klass.to_dict ``` ```` ````` `````{py:class} Evaluation(uuid: str, klass_uuid: str, title: str = '', date: str = '2024-08-31', number: str = '', extra: list[str] = [], exercises: list[str] = []) :canonical: phystool.helper.Evaluation ```{autodoc2-docstring} phystool.helper.Evaluation ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} phystool.helper.Evaluation.__init__ ``` ````{py:method} update(data: dict) -> tuple[set[str], set[str]] :canonical: phystool.helper.Evaluation.update ```{autodoc2-docstring} phystool.helper.Evaluation.update ``` ```` ````{py:method} to_dict() -> dict[str, str | list[str]] :canonical: phystool.helper.Evaluation.to_dict ```{autodoc2-docstring} phystool.helper.Evaluation.to_dict ``` ```` ````` ````{py:function} progress_bar(max_step: int, step: int, length: int, msg: str) -> None :canonical: phystool.helper.progress_bar ```{autodoc2-docstring} phystool.helper.progress_bar ``` ````