From 49b851e51a36499672d69914e45f55f2a0fb09ef Mon Sep 17 00:00:00 2001 From: Mallets <Mallets@users.noreply.github.com> Date: Tue, 12 Nov 2024 09:27:42 +0000 Subject: [PATCH] deploy: 0cddaf8a095227974f42d936c8aef293bd6acae8 --- docs/getting-started/first-app/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/getting-started/first-app/index.html b/docs/getting-started/first-app/index.html index 65799bff..16c4a602 100644 --- a/docs/getting-started/first-app/index.html +++ b/docs/getting-started/first-app/index.html @@ -24,7 +24,7 @@ </span></span></code></pre></div><p>Now we need a subscriber, <code>z_subscriber.py</code> that can receive the measurements:</p><div class=highlight><pre tabindex=0 style=background-color:#f0f3f3;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-python data-lang=python><span style=display:flex><span><span style=color:#069;font-weight:700>import</span> <span style=color:#0cf;font-weight:700>zenoh</span><span style=color:#555>,</span> <span style=color:#0cf;font-weight:700>time</span> </span></span><span style=display:flex><span> </span></span><span style=display:flex><span><span style=color:#069;font-weight:700>def</span> <span style=color:#c0f>listener</span>(sample): -</span></span><span style=display:flex><span> <span style=color:#366>print</span>(<span style=color:#c30>f</span><span style=color:#c30>"Received </span><span style=color:#a00>{</span>sample<span style=color:#555>.</span>kind<span style=color:#a00>}</span><span style=color:#c30> ('</span><span style=color:#a00>{</span>sample<span style=color:#555>.</span>key_expr<span style=color:#a00>}</span><span style=color:#c30>': '</span><span style=color:#a00>{</span>sample<span style=color:#555>.</span>payload<span style=color:#555>.</span>deserialize(<span style=color:#366>str</span>)<span style=color:#a00>}</span><span style=color:#c30>')"</span>) +</span></span><span style=display:flex><span> <span style=color:#366>print</span>(<span style=color:#c30>f</span><span style=color:#c30>"Received </span><span style=color:#a00>{</span>sample<span style=color:#555>.</span>kind<span style=color:#a00>}</span><span style=color:#c30> ('</span><span style=color:#a00>{</span>sample<span style=color:#555>.</span>key_expr<span style=color:#a00>}</span><span style=color:#c30>': '</span><span style=color:#a00>{</span>sample<span style=color:#555>.</span>payload<span style=color:#555>.</span>to_string()<span style=color:#a00>}</span><span style=color:#c30>')"</span>) </span></span><span style=display:flex><span> </span></span><span style=display:flex><span><span style=color:#069;font-weight:700>if</span> __name__ <span style=color:#555>==</span> <span style=color:#c30>"__main__"</span>: </span></span><span style=display:flex><span> session <span style=color:#555>=</span> zenoh<span style=color:#555>.</span>open(zenoh<span style=color:#555>.</span>Config())