pygpibtoolkit/prologix.py

changeset 99
12dbadb58b19
parent 91
f2a8f688dbc0
equal deleted inserted replaced
98:4cbd3d410230 99:12dbadb58b19
115 if address is not None: 115 if address is not None:
116 self.set_address(address, check=False) 116 self.set_address(address, check=False)
117 self._cnx.write(b'++read eoi\r') # idem 117 self._cnx.write(b'++read eoi\r') # idem
118 ret = '' 118 ret = ''
119 i = 0 119 i = 0
120 while not ret.endswith('\r\n') and i<3: 120 while not ret.endswith('\r\n') and i < 3:
121 ret += (b''.join(self._cnx.readlines())).decode() 121 ret += (b''.join(self._cnx.readlines())).decode()
122 time.sleep(self._timeout) # required? 122 time.sleep(self._timeout) # required?
123 i += 1 123 i += 1
124 return ret 124 return ret
125 125

mercurial