diff rs_fsp7_example.py @ 56:91b476ebc0f2

Run through 2to3
author Daniel O'Connor <doconnor@gsoft.com.au>
date Tue, 08 Dec 2020 14:00:45 +1030
parents 438a5f1ddcd7
children 00800345fbae
line wrap: on
line diff
--- a/rs_fsp7_example.py	Tue Dec 08 13:59:05 2020 +1030
+++ b/rs_fsp7_example.py	Tue Dec 08 14:00:45 2020 +1030
@@ -33,7 +33,7 @@
 def test(r):
     # ID instrument
     r.write('*IDN?')
-    print "ID is " + r.read(5)
+    print("ID is " + r.read(5))
 
     # Reset to defaults
     r.write("*RST")
@@ -56,7 +56,7 @@
     # Wait up to 10 seconds for it to be done
     r.write("*OPC?")
     opc = scpi.getdata(r.read(10), int)
-    print "OPC - %d" % (opc)
+    print("OPC - %d" % (opc))
 
     # Set peak excursion
     r.write("CALC:MARK:PEXC 6DB")
@@ -64,7 +64,7 @@
     r.write("CALC:MARK:FUNC:TOI ON")
     r.write("CALC:MARK:FUNC:TOI:RES?")
     toi = scpi.getdata(r.read(1))
-    print "Result = %.2f" % (toi)
+    print("Result = %.2f" % (toi))
 
     # Set data format
     r.write("FORM REAL,32")