|
|
@ -102,7 +102,7 @@ def printNow(query, results): |
|
|
|
print('\n | \n', file=print_pointer, flush=True) |
|
|
|
sleep(3) |
|
|
|
|
|
|
|
end_line = insert_linebreaks('These are the first 5 results that the algorithm selected.', 35) |
|
|
|
end_line = insert_linebreaks('These are the first {} results that the algorithm selected.'.format(results_count), 35) |
|
|
|
print("\n***\n{}\n***".format(end_line), file=print_pointer, flush=True) |
|
|
|
print(escpos['paperfeed_1l'], file=print_pointer, flush=True) |
|
|
|
print(escpos['paperfeed_1l'], file=print_pointer, flush=True) |
|
|
@ -113,11 +113,10 @@ def printNow(query, results): |
|
|
|
|
|
|
|
|
|
|
|
except: |
|
|
|
# print('test') |
|
|
|
e = sys.exc_info()[0] |
|
|
|
print("Could not print: {}".format(e)) |
|
|
|
|
|
|
|
# query = 'noise' |
|
|
|
# results, _, _ = readings.request_results(query) |
|
|
|
# pprint(results) |
|
|
|
# printNow(query, results) |
|
|
|
if __name__ == '__main__': |
|
|
|
query = 'noise' |
|
|
|
results, _, _ = readings.request_results(query) |
|
|
|
printNow(query, results) |