Would adding a non root user to the lp group help with this problem?

Assuming things work like they do here:

ls -l /dev/lp* shows owner root group lp

if things are different make a group for lp & chgrp lp /dev/lp*

Then add a non root user to the group lp and try running you code as that user.

Just an idea,

Steve



Steve