Get the latest tech news

Writing your own CUPS printer driver in 100 lines of Python (2018)


Behind the scenes blog of pretix, your friendly ticketing system from next door.

Last year, I took a closer look at this market and tested devices from two of the major ticket printer vendors: The BOCA Lemur as well as the Practical Automation uITL+2003CF model. The uITL+ is missing a network port in contrast to the BOCA Lemur, but the uITL+ features a nicer case (smaller and metal instead of plastic) and is way more affordable to obtain, at least here in Europe. Usually, most CUPS filters are written in C, but I decided to choose Python instead – not only because I know it better, but also because writing it in a compiled language also means that we need to cross-compile it to different architectures like ARM if we want to run it on devices like the Raspberry Pi, which creates additional effort.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of python

python

Photo of lines

lines

Photo of CUPS printer driver

CUPS printer driver

Related news:

News photo

Python in LibreOffice (LibrePythonista Extension)

News photo

Show HN: Pixelagent – Build your Stateful Agent Framework in 200 lines of code

News photo

Project Verona: Fearless Concurrency for Python