0
votes
0answers
108 views

Raspberry Pi, how to execute program as a SU and stop loop in bootup

I have a script python.py and wish to execute the program after the boot-up sequence, one problem is it needs SU access in order to have the write function inside the program. Without the SU, the ...
1
vote
2answers
277 views

os.popen returns empty string when called from cron

I'm trying to get my Raspberry Pi's CPU usage like so: def get_cpu_usage(): return os.popen("top -n1 | awk '/Cpu\(s\):/ {print $2}'").readline().strip() When executed normally, this method ...
0
votes
1answer
850 views

Where is Python installed on Raspberry Pi?

I am trying to set up Mercurial on a Raspberry Pi, but the instructions I am using are for Ubuntu. It suggests that the Python folder is usr/bin/python, but this does not exist on my Pi. Where is ...
1
vote
1answer
289 views

Running script on boot

I'm trying to run a Python script on startup on a Raspberry Pi. I know that this can be accomplished by adding to various files. I plan to add to bashrc (worked previously, on similar attempts), but I ...
1
vote
3answers
3k views

How to start python program at boot on Arch Linux ARM?

I am running Arch Linux ARM on my Raspberry Pi, and I need to start a python (which should keep running until it either crashes or the machine loses power) program at boot with no input at all from ...