def evaluate(calling):
c = str(text.get("1.0",END)).strip()
for result in results:
print('Trying to connect to {}...'.format(socket.inet_ntoa(result['zc_info'].address)))
scpi_connection = get_scpi_connection_tuple((socket.inet_ntoa(result['zc_info'].address), result['zc_info'].port))
if scpi_connection is not (None, None):
if any("?" in s for s in c):
rs = receive_scpi(scpi_connection, c)
textb.delete("1.0", END)
if strType(rs) == "float":
t = str(float(rs))
else:
t = str(rs)
textb.insert(END, t)
if ttsenabled.get():
thread.start_new_thread(tts, (t,))
else:
send_scpi(scpi_connection, str(text.get("1.0",END)).strip())
text.delete("1.0", END)
评论列表
文章目录