Jun-12-2017, 03:25 PM
(This post was last modified: Jun-12-2017, 03:25 PM by montypython76.)
Hi there,
I have an issue printing a textfile with a python script. The script is simple:
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
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