adaptions to python3

master
Christian Reinbacher 2019-04-16 18:01:59 +02:00
rodzic ce495a44f5
commit 31adc31abb
1 zmienionych plików z 3 dodań i 2 usunięć

Wyświetl plik

@ -105,13 +105,14 @@ def main(argv):
to_send.append('M05')
#print max_point
if any (new_point>np.array([[3200],[1000]])):
print 'Image too large! 3200 x 1000 is the maximum!'
print('Image too large! 3200 x 1000 is the maximum!')
ser = serial.Serial(port=serialport,baudrate=2000000,timeout=10)
widgets = [Percentage(), ' ', Bar(marker=RotatingMarker()),' ', ETA()]
pbar = ProgressBar(widgets=widgets).start()
for line in pbar(to_send):
#print line
ser.write('%s\n'%line)
ser_cmd = '%s\n'%line
ser.write(ser_cmd.encode())
ser.readline()
ser.close()