diff --git a/Makefile b/Makefile index 3677ed14c3dc0d80ec20ff49db393cc981246f52..350801ba8b99cb9883c1cabbb944488a14f3e9a5 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ MODNAME = $(MAIN:.py=) default: bin @cp src/*.py bin/${DIRNAME} - @echo "#!/usr/bin/env python\nimport sys\nsys.path.append(sys.path[0]+'/${DIRNAME}')\nfrom ${MODNAME} import main\nif __name__ == '__main__':\n main()\n" > bin/${NAME} + @echo "#!/usr/bin/env python3\nimport sys\nsys.path.append(sys.path[0]+'/${DIRNAME}')\nfrom ${MODNAME} import main\nif __name__ == '__main__':\n main()\n" > bin/${NAME} @chmod +x bin/${NAME} bin/${DIRNAME}/${MAIN} bin: diff --git a/src/bcs.py b/src/bcs.py index 99c79f76da9d39585bc32cd33258090879395b08..cad9daee3523d29800be3118e3db584915073ba0 100755 --- a/src/bcs.py +++ b/src/bcs.py @@ -67,7 +67,7 @@ class BCS(PyTango.Device_4Impl): # Device destructor #------------------------------------------------------------------ def delete_device(self): - #print "[Device delete_device method] for device",self.get_name() + #print ("[Device delete_device method] for device",self.get_name()) if self.connectionOk: self.s.close() del self.s @@ -77,7 +77,7 @@ class BCS(PyTango.Device_4Impl): # Device initialization #------------------------------------------------------------------ def init_device(self): - #print "In ", self.get_name(), "::init_device()" + #print ("In ", self.get_name(), "::init_device()") self.set_state(PyTango.DevState.ON) self.get_device_properties(self.get_device_class()) self.connectionOk = False @@ -101,7 +101,7 @@ class BCS(PyTango.Device_4Impl): # Read Attribute Hardware #------------------------------------------------------------------ def read_attr_hardware(self,data): - #print "In ", self.get_name(), "::read_attr_hardware()" + #print ("In ", self.get_name(), "::read_attr_hardware()") return @@ -109,7 +109,7 @@ class BCS(PyTango.Device_4Impl): # Read Monitoring attribute #------------------------------------------------------------------ def read_ConnectionOK(self, attr): - #print "In ", self.get_name(), "::read_Monitoring()" + #print ("In ", self.get_name(), "::read_Monitoring()") # Add your own code here attr.set_value(self.connectionOk) @@ -128,7 +128,7 @@ class BCS(PyTango.Device_4Impl): # argin: #------------------------------------------------------------------ def WriteRead(self, argin): - #print "In ", self.get_name(), "::Acquire()" + #print ("In ", self.get_name(), "::Acquire()") # Add your own code here reply = None if not self.connectToBCS(): @@ -141,7 +141,7 @@ class BCS(PyTango.Device_4Impl): if not readable[0]: PyTango.Except.throw_exception("BCS Communication error","Timeout error","WriteRead") reply = str(self.s.recv(1024)) - self.failures = 0 + self.failures = 0 except: self.failures += 1 if self.failures == 10: @@ -215,7 +215,7 @@ class BCS(PyTango.Device_4Impl): bcs_full_cmd = "UES %s %d" % (self.BCS_cmds[attr.get_name()], value_in) reply = self.WriteRead(bcs_full_cmd) if not "OK" in reply: - self.error_stream("BCS Communication error %s" % str(reply)) + self.error_stream("BCS Communication error %s" % str(reply)) PyTango.Except.throw_exception("BCS Communication error",reply,"writedUesToBCS") #------------------------------------------------------------------ @@ -416,7 +416,7 @@ class BCSClass(PyTango.DeviceClass): def __init__(self, name): PyTango.DeviceClass.__init__(self, name) self.set_type(name); - #print "In BCSClass constructor" + #print ("In BCSClass constructor") #================================================================== #