TIP: Click on subject to list as thread! ANSI
echo: rberrypi
to: ROBH
from: VINCENT COEN
date: 2020-11-10 19:05:00
subject: Python script run in Pi d

Hello RobH!

Tuesday November 10 2020 17:40, you wrote to All:

 > I have a python script to run some leds, and I'm having a problem with
 > it! When I ssh into my pi zero, then sudo python3 python script.py, it
 > doesn't run, no leds are lit.
 > But if I open a terminal in the pi desktop and run the same command
 > line, it works and the leds light up.

 > Anyone know why this happens.

Who owns the script.py and where is it ?


Remember sudo takes root priv. and the directory so try :

sudo python3 /home/pi/script.py   or whater the user name is along with the
correct python run command is.


Vincent

--- Mageia Linux v7.1 X64/Mbse v1.0.7.17/GoldED+/LNX 1.1.5-b20180707
* Origin: Air Applewood, The Linux Gateway to the UK & Eire (2:250/1)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.