![]() |
Rasp Pi: "lp: not allowed to print" when using a python script - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Rasp Pi: "lp: not allowed to print" when using a python script (/thread-3671.html) |
Rasp Pi: "lp: not allowed to print" when using a python script - montypython76 - Jun-12-2017 Hi there, I have an issue printing a textfile with a python script. The script is simple: import os os.system('lp "testdatei.txt"')But instead of a clean print I get the error above. Tried also with "sudo". Using 'lp "testdatei.txt"' directly in a terminal windows works perfectly. Even using the code above within the python interactive mode works, but not as a script. User "pi" is in the lp group. I have no idea were the right problem exists. I also tried with subprocess, but this also led to the error above RE: Rasp Pi: "lp: not allowed to print" when using a python script - DeaD_EyE - Jun-13-2017 Cross-Post with solution: https://www.raspberrypi.org/forums/viewtopic.php?t=185806&p=1174200 |