I have a Raspberry Pi 3 which has a printer connected to his USB port.
I have a PiFace Board on the Raspberry.
I have a python script file (.py) to print a logo + a text.
The script is working because when I execute it from the Raspberry terminal it works.
Now, when I push a button on the PiFace I would like to execute the python script file to print.
How can I do that ?
Many thanks for your help and advices!
Last edit: yann2021 2025-08-26
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I have a Raspberry Pi 3 which has a printer connected to his USB port.
I have a PiFace Board on the Raspberry.
I have a python script file (.py) to print a logo + a text.
The script is working because when I execute it from the Raspberry terminal it works.
Now, when I push a button on the PiFace I would like to execute the python script file to print.
How can I do that ?
Many thanks for your help and advices!
Last edit: yann2021 2025-08-26
Hello yann,
In the past I have experimented with the execution of Linux commands using Codesys.
Maybe this article helps: https://www.linkedin.com/pulse/run-linux-commands-from-codesys-jouke-aalvanger
When you are able to execute Linux commands in Codesys, you can run the Python script.