
Remember the hack to change the “READY” status message on your HP printer over TCP/IP? Well, that was fun (”PC LOAD LETTER” and “OUT OF CHEESE” being the classics). Unfortunately, the display isn’t long enough for some messages (like Twitter’s 140 characters vs. 2×16 on your LaserJet 8100 DN. So I wrote a little script that scrolls your string through the printer display. The lounge lacking a wall-mounted plasma screen, we initially planned to port iSchoolWhatsup to the printer, but meh.
scroll.py
from socket import *
import time
# Find your printer’s IP address by printing a status/test page (it’s usually a menu item somewhere).
address = ”
def scroll(msg):
length = 16
i = 0
while (i < len(msg) - (length - 1)):
print msg[i:i + length]
send_printer(msg[i:i + length])
i += 1
time.sleep(.15)
time.sleep(4)
send_printer(”ready”)
def send_printer(msg):
# myHost = ‘128.32.226.104′
myPort = 9100
s = socket(AF_INET, SOCK_STREAM) # create a TCP socket
s.connect((address, myPort)) # bind it to the server port
s.send(”"”\x1B%-12345X@PJL RDYMSG DISPLAY = \”"”" + msg + “”"\”\r\n\x1B%-12345X\r\n”"”)
s.close()



Thanks. If I’m trying to print something out minutes before a deadline and I can’t because the printer is busy trying to keep up with minute-by-minute commentary on the minutiae of geek lives, now I’ll know whose ass to kick.
Yeah, that was pretty much the reason for meh.