I have got a problem trying to use the parallel port and hope you can help me.
I am writing a program for a cinema using Python. Everything is working already, but there is one unsolved problem - I have to make the dot matrix printer print the tickets, which does not work
After days of searching for a solution I came across your site and inpout32.dll, which I installed. I took the Python sample program written by Lawrie Abbott which I found at
http://logix4u.net/I modified the program and tried to print out the smilie sample of this ESC/P site:
http://de.wikipedia.org/wiki/ESC/PThe code for it is written on top to the "Weblinks" of that page.
This is the Pytho code:
============
import ctypes
read = []
for n in [27, 42, 5, 24, 0, 0, 7, 15, 31, 62, 124, 120, 113, 241, 225, 224, 224, 224, 224, 225, 241, 113, 120, 124, 62, 31, 15, 7, 0, 13, 27, 74, 24, 27, 42, 5, 24, 0, 255, 255, 255, 129, 0, 0, 0, 195, 195, 195, 1, 1, 1, 1, 195, 195, 195, 0, 0, 0, 129, 255, 255, 255, 13, 27, 74, 24, 27, 42, 5, 24, 0, 0, 224, 240, 248, 124, 62, 30, 142, 143, 199, 199, 199, 199, 199, 199, 143, 142, 30, 62, 124, 248, 240, 224, 0, 13, 27, 74, 24]:
ctypes.windll.inpout32.Out32(0x37a, 1)
ctypes.windll.inpout32.Out32(0x378, n)
read.append(ctypes.windll.inpout32.Inp32(0x378))
ctypes.windll.inpout32.Out32(0x37a, 0)
print (read)
============
All data sent out is read correctly by Inp32. But the printer doesn't do anything.
I hope you can give me any tips, what I (or the OS - Win XP) do wrong. I am grateful for any help!