This library allows you to control Markem Imaje printers (9040, 9040S, 9040 IP65, 9040 Contrast, 9042, 9042 IP65) via network. It may also work with other versions but I cannot guarantee that
import imaje
printer_1 = imaje.Printer(printer_ip="192.168.1.1", printer_port=2101)
ready_to_dialoug = printer_1.get_v24_dialog()
if ready_to_dialoug:
# 0 = long shutdown (Stops the printer and starts an auto-cleaning)
# 1 = short shutdown (Stops the printer)
# 255 = start-up
successful = printer_1.start_stop_printer(255)
print("Starting Printer" if successful else "Failure")