Best way to run python script with Xbian?
|
7th Sep, 2013, 07:22 PM
Post: #1
|
|||
|
|||
Best way to run python script with Xbian?
HI,
Probably a bit noobish, but what's the best/preferred way to run a python script at start up to run alongside xbian without prbolems? I want to start looking into some hardware/automation stuff soon. Skywatch. |
|||
7th Sep, 2013, 07:59 PM
Post: #2
|
|||
|
|||
RE: Best way to run python script with Xbian?
You could use "nano /etc/rc.local" to execute commands at startup of your Rpi for example.
|
|||
8th Sep, 2013, 05:29 AM
Post: #3
|
|||
|
|||
RE: Best way to run python script with Xbian?
I'm a noob....I used the upstart.conf route, /etc/init/ , it works for me for grabbing an event before xbmc does at start-up and can also respwan if necessary. Here is the one i wrote... uimapper.conf to exec the python code
http://markamc.cybaman.net/?p=50 hope it helps mark |
|||
8th Sep, 2013, 06:46 AM
Post: #4
|
|||
|
|||
RE: Best way to run python script with Xbian?
Yes, the best way would be to write upstart script /etc/init/my_python_script.conf
Code: #!upstart If it should run constantly, respawn will re-start the script if crashed (exited with return code different than 0). If it is just task-like script (should be started - do something - and exit), remove "respawn" a put "task" instead. It will be started with startup of XBian and depending whether it's "task" or not, it will remain running (check with "status my_python_script") or will just start, do the job and stop. If the script is providing some output text, it can be found at /var/log/upstart/my_python_script.log . Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here |
|||
13th Sep, 2013, 07:37 PM
Post: #5
|
|||
|
|||
RE: Best way to run python script with Xbian?
Thanks for that - It will need to run constantly as it will be controlling the power to the amp and probably some lighting as well.
Does anyone know if it is possible to run WebIOPI alongside xbian? This will be crucial to the plan. Can I use startup to get this going too? Cheers! Skywatch |
|||
15th Sep, 2013, 09:37 AM
Post: #6
|
|||
|
|||
RE: Best way to run python script with Xbian?
if it runs on Debian, there is 99% probability that it will run on XBian as well.
Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here |
|||
« Next Oldest | Next Newest »
|