From 3a36ee085363d0de03f92acb69fb0197f0391a31 Mon Sep 17 00:00:00 2001 From: Simon Rose Date: Mon, 28 Sep 2026 13:35:41 +0200 Subject: [PATCH] Fix print syntax in examples --- documentation/client.rst | 2 +- documentation/rpc.rst | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/documentation/client.rst b/documentation/client.rst index 7d0c0199..39d400f9 100644 --- a/documentation/client.rst +++ b/documentation/client.rst @@ -55,7 +55,7 @@ Instead it accepts a callback function which is called with each new :py:class:`Value`, or :py:class:`Exception`. :: def cb(V): - print 'New value', V + print('New value', V) sub = ctxt.monitor('pv:name', cb) time.sleep(10) # arbitrary wait sub.close() diff --git a/documentation/rpc.rst b/documentation/rpc.rst index 0d3bcc6e..988d013a 100644 --- a/documentation/rpc.rst +++ b/documentation/rpc.rst @@ -72,7 +72,7 @@ This proxy must be associated with a Context. :: from p4p.client.thread import Context ctxt = Context('pva') proxy = MyProxy(context=ctxt, format='pv:call:') - print proxy.add(1, 1) + print(proxy.add(1, 1)) A decorated proxy class has two additional contructor arguments. @@ -98,7 +98,7 @@ It may be helpful to illustrate what a proxy method call is actually doing. :: 'rhs': 1, }, }) - print ctxt.rpc('pv:call:add', V) + print(ctxt.rpc('pv:call:add', V)) API Reference -------------