label_printer/test.py

10 lines
327 B
Python
Raw Normal View History

2024-09-12 18:44:00 +00:00
import ctypes
mylib = ctypes.CDLL('./library_bridge.so')
mylib.print_text("/dev/usb/lp0".encode('utf-8'), "test\n".encode('utf-8'))
mylib.print_text("/dev/usb/lp0".encode('utf-8'), "test\n".encode('utf-8'))
mylib.print_text("/dev/usb/lp0".encode('utf-8'), "test\n".encode('utf-8'))
mylib.cut("/dev/usb/lp0".encode('utf-8'))