Commit 680a8df7 authored by Tammo Jan Dijkema's avatar Tammo Jan Dijkema
Browse files

Make HpibDevice a new-style object

parent ffdff5f8
......@@ -28,8 +28,8 @@ class PrologixGpibUsb(PortDevice):
self._validate_port(port)
if verbose:
print "Looking for ports such as %s in range %d on %s" % \
(port, max_device_num, platform.system())
print("Looking for ports such as %s in range %d on %s" % \
(port, max_device_num, platform.system()))
self._find_available_port(max_device_num, port, port_format, timeout, verbose)
......@@ -59,7 +59,7 @@ class PrologixGpibUsb(PortDevice):
def _find_available_port(self, max_device_num, port, port_format, timeout, verbose):
while int(self._rematch.group(2)) < max_device_num:
if verbose:
print "trying ", port
print("trying ", port)
try:
self._serialPort = serial.Serial(port, timeout=timeout)
break
......@@ -144,7 +144,7 @@ class GPIB_232_485CT_A(PortDevice):
self._commandCount = self._serialPort.write(self._commandStr)
class HpibDevice():
class HpibDevice(object):
def __init__(self, hpib_address, port, keepLocal=False,pause=0):
self._hpib_address = hpib_address
self._port = port
......@@ -169,4 +169,4 @@ class HpibDevice():
return self._answerStr
def get_devices(self):
return ["Not implemented"]
\ No newline at end of file
return ["Not implemented"]
Markdown is supported
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