From b002a29d18d8d2994e55e131b2771e5715ec8894 Mon Sep 17 00:00:00 2001 From: Matthias Klumpp Date: Thu, 15 Aug 2024 16:12:50 +0200 Subject: [PATCH] pyscript: Adjust demo script for slight API modification --- content/docs/modules/pyscript.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/content/docs/modules/pyscript.md b/content/docs/modules/pyscript.md index 8bf9f74..f2e3155 100644 --- a/content/docs/modules/pyscript.md +++ b/content/docs/modules/pyscript.md @@ -47,7 +47,7 @@ oport_frame = syl.get_output_port('frame-out') oport_tab = syl.get_output_port('tablerow-out') -def prepare(): +def prepare() -> bool: """This function is called before a run is started. You can use it for (slow) initializations. NOTE: You are *not* able to send output to ports here, or access @@ -60,6 +60,8 @@ def prepare(): oport_tab.set_metadata_value('table_header', ['Time Received', 'Frame Time']) oport_tab.set_metadata_value('data_name_proposal', 'events/table') + return True + def start(): """This function is called immediately when a run is started.