larvaworld.lib.util.stdout

Methods for managing context and attributes

Classes

TimeUtil

Class for managing simulation time

Functions

suppress_stdout_stderr()

A context manager that redirects stdout and stderr to devnull

suppress_stdout(show_output)

remove_prefix(→ str)

remove_suffix(→ str)

rsetattr(obj, attr, val)

rgetattr(obj, attr, *args)

try_except(success, failure, *exceptions)

storeH5(df[, path, key, mode])

common_ancestor_class(classes)

Module Contents

class larvaworld.lib.util.stdout.TimeUtil

Class for managing simulation time

static current_time_millis() int
static current_time_sec() int
static format_time_seconds(seconds: int) str
static format_date_time() str
larvaworld.lib.util.stdout.suppress_stdout_stderr()

A context manager that redirects stdout and stderr to devnull

larvaworld.lib.util.stdout.suppress_stdout(show_output: bool)
larvaworld.lib.util.stdout.remove_prefix(text: str, prefix: str) str
larvaworld.lib.util.stdout.remove_suffix(text: str, suffix: str) str
larvaworld.lib.util.stdout.rsetattr(obj, attr: str, val)
larvaworld.lib.util.stdout.rgetattr(obj, attr: str, *args)
larvaworld.lib.util.stdout.try_except(success, failure, *exceptions)
larvaworld.lib.util.stdout.storeH5(df, path: str | None = None, key: str | None = None, mode: str | None = None, **kwargs)
larvaworld.lib.util.stdout.common_ancestor_class(classes)