PDA

View Full Version : Executing sopcast process


julz
2008-06-02, 16:59
Hello,

I`ve been trying to execute a script ( through the script section ) to launch a sopcast daemon like this :

./sp-sc-auth sop://202.190.75.149:3912/3862 3908 8908 > /dev/null &

it all works well through the command line and I can play the live stream without trouble,linking it with a .strm file, no problem .

I don`t want to connect to my box and execute this line through ssh everytime. So I just want a python script to execute this command .

the problem is that an os.system command hangs because the process never finished, and calling a sh script through python strangely causes the stream to play too fast .

Basically my question is, what is the best way to launch a simple shell command through the script section ??

of course being able to launch the sopcast daemon when I want to play the .strm file would be even better :)


Thanks guys

althekiller
2008-06-02, 19:25
I'm pretty sure a xbmc.system() function (don't quote me on the exact name) was added a while back for just this reason. Check the docs.

julz
2008-06-12, 02:50
hmm, I can`t seem to find this function, or any other execute a system process via the xbmc module :(

althekiller
2008-06-12, 02:54
It's there, I assure you.

Actually, it may be a built-in function on second thought.