script_helpers.py
rerun.script_helpers
Helper functions for Rerun scripts.
These helper functions can be used to wire up common Rerun features to your script CLi arguments.
Example
import argparse
import rerun as rr
parser = argparse.ArgumentParser()
rr.script_add_args(parser)
args = parser.parse_args()
rr.script_setup(args, "my_application")
# ... Run your logging code here ...
rr.script_teardown(args)
def script_add_args(parser)
Add common Rerun script arguments to parser
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
parser |
ArgumentParser
|
The parser to add arguments to. |
required |
def script_setup(args, application_id)
def script_teardown(args)
Run common post-actions. Sleep if serving the web viewer.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
args |
Namespace
|
The parsed arguments from |
required |