I'm working on a cross-platform Python program that prints to a receipt
printer. The code is simple, I just do something like this:
printer = file('/dev/lp0','w') # on Win32, change to 'lpt1'
p.write("whatever")
p.close()
I would like to gracefully handle situations such as when the paper is out
or the printer is powered off. Right now the program just hangs.
Suggestions? Thanks...