Skip to content
Snippets Groups Projects
Commit c67f74bb authored by Claudio Scafuri's avatar Claudio Scafuri :speech_balloon:
Browse files

python3

parent 22c5bb66
No related branches found
No related tags found
1 merge request!1Qt5 python3
......@@ -14,7 +14,7 @@ class TangoDev(object):
try:
self.dev = PyTango.DeviceProxy(self._name)
except:
print('Cannot initialize %s device' % self._name)
print(('Cannot initialize %s device' % self._name))
def cmd_exec(self, comm, *args, **kwargs):
if self.dev is None:
......@@ -23,14 +23,14 @@ class TangoDev(object):
try:
self.dev.command_inout(comm, args[0])
except Exception as error:
print('Failed to execute command %s (with arguments) on device %s.' % (comm, self.dev))
print(error[1].desc)
print(('Failed to execute command %s (with arguments) on device %s.' % (comm, self.dev)))
print((error[1].desc))
else:
try:
self.dev.command_inout(comm)
except Exception as error:
print('Failed to execute command %s on device %s.' % (comm, self.dev))
print(error[1].desc)
print(('Failed to execute command %s on device %s.' % (comm, self.dev)))
print((error[1].desc))
def getAttrValue(self, attr):
if self.dev is None:
......@@ -58,7 +58,7 @@ class TangoDev(object):
try:
temp = self.dev.write_attribute(attr, value)
except:
print('Cannot set %f for device %s' % (value, self._name))
print(('Cannot set %f for device %s' % (value, self._name)))
def State(self):
try:
......@@ -70,7 +70,7 @@ class TangoDev(object):
def getProperty(self, propertyName):
try:
temp = self.dev.get_property(propertyName)
if propertyName in temp.keys():
if propertyName in list(temp.keys()):
return float(temp[propertyName][0])
else:
return None
......@@ -208,7 +208,7 @@ class Trigger(TangoDev):
if time_shift:
self.setAttrValue(self._attMaster, time_shift)
else:
print('Error trying to shift trigger reference for dev %s.' % self._name)
print(('Error trying to shift trigger reference for dev %s.' % self._name))
class BSTController(object):
......
#!/usr/bin/python
#!/usr/bin/python3
import sys
from PyQt5 import QtCore, QtWidgets
import openBSTGUI
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment