How to run a simple python script?
#1
It seems like I need a script to get done what I want in a skin, so I just created a python .py file which I dumped into the skin addon folder tree and invoke it as <onclick> RunScript(pathname/filename.py). It works but I get this in the log:

Script invoked without an addon. Adding all addon modules installed to python path as fallback. This behaviour will be removed in future version.

Not sure what this is telling me? My assumption is that Kodi prefers that I have something like addon.xml that calls out the modules I need to import from. Am I supposed to create a full-on add-on just to do some simple things?

scott s.
.
Reply
#2
Previously when an addon or script was invoked in XBMC/Kodi, all installed addons were added to its sys.path, so you could access any module even if it wasn't specified in your addon.xml as a dependency. <requires> section in addon.xml were used only to auto-install necessary dependencies along with your addon.
Now only those modules that are explicitly specified in <requires> section of your addon.xml are added to sys.path.

I'm not sure how standalone scripts work now, but I guess they can access only the core Kodi Python API modules.
Reply

Logout Mark Read Team Forum Stats Members Help
How to run a simple python script?0