execute external script (please help)
#1
Guys,


I really need to execute an external script from inside an addon.

Using the subprocess module gives me the error:
OSError: [Errno 10] No child processes]

Using os.system gives me the error:
Nov 28 20:10:58 nicks-MacBook-Pro [0x0-0x1be1be].com.teamxbmc.xbmc[1989]: ImportError: No module named site

I will be grateful with the force of a 1000 suns if you help me execute an external script!!!!!

Thanks!!!

Nick
Reply
#2
Script? Code?
Reply
#3
In the xbmc addon directory
xbmc.myaddon.test
|->myScript.py
|->testScript.py

my python scripts are simply:

myScript.py
import os
os.sys("python testScript.py)

testScript.py
print "testing testing"


-----------------------
The catch is that the testScript HAS to be run on the local machine OS python VIA the xbmc python. This is becuase of various operating system c bindings. (It's the leap motion controller I'm trying to get working from a single click in an addon.)

Basically I just need to run a script using the local machine python.

I will be eternally gratefull and will send you flowers and beer if you can help.
Reply
#4
You mean os.system('python testScript.py') right?
Reply
#5
Sorry yes!

Typed it wrong.

Thanks!
Reply
#6
Here's something interesting.

Running an os.system("echo $PYTHONPATH") inside xbmc says my python path is:
/Applications/XBMC.app/Contents/Frameworks/

Running it from inside of command line is
/Users/nick/Environment/pythonpath


So even when I make a system call it's not calling my local machine system python apparently.
Reply
#7
HEEEEELLLLLP MEEHHHHHH please?!
Reply
#8
Can you paste your actual full script codes (inside [ code ] tags please).
BBC Live Football Scores: Football scores notifications service.
script.squeezeinfo: shows what's playing on your Logitech Media Server
Reply

Logout Mark Read Team Forum Stats Members Help
execute external script (please help)0