# HG changeset patch # User Edouard Tisserant # Date 1684759249 -7200 # Node ID ab0afe798428ca6c80e5639a103fde43d2d00ab3 # Parent 6f3e20690172e09ff5dfc9d8a1638487acd6cda5 Examples: use print() function in "python" example diff -r 6f3e20690172 -r ab0afe798428 exemples/python/py_ext_0@py_ext/pyfile.xml --- a/exemples/python/py_ext_0@py_ext/pyfile.xml Mon May 22 14:38:25 2023 +0200 +++ b/exemples/python/py_ext_0@py_ext/pyfile.xml Mon May 22 14:40:49 2023 +0200 @@ -6,19 +6,19 @@ diff -r 6f3e20690172 -r ab0afe798428 exemples/python/python@py_ext/pyfile.xml --- a/exemples/python/python@py_ext/pyfile.xml Mon May 22 14:38:25 2023 +0200 +++ b/exemples/python/python@py_ext/pyfile.xml Mon May 22 14:40:49 2023 +0200 @@ -15,12 +15,12 @@ i = ctypes.c_int() if(Python_to_C_Call(arg, i)): res = i.value - print "toC:", arg, "from C:", res, "FBID:", FBID + print("toC:", arg, "from C:", res, "FBID:", FBID) else: - print "Failed Python_to_C_Call failed" + print("Failed Python_to_C_Call failed") res = None - print "Python read PLC global :",PLCGlobals.Test_Python_Var - print "Python read PLC global Grumpf :",PLCGlobals.Grumpf + print("Python read PLC global :",PLCGlobals.Test_Python_Var) + print("Python read PLC global Grumpf :",PLCGlobals.Grumpf) PLCGlobals.Second_Python_Var = 789 sys.stdout.flush() return res @@ -47,23 +47,23 @@ global x, y x = 2 y = 5 -print "py_runtime init:", x, ",", y +print("py_runtime init:", x, ",", y) ]]>