Getting started with Python and XBMC
#1
I know there are some How-Tos in the Wiki, but I still have problems to simply get started with a first script.

I already have some Python experience on Windows/Linux/OS X - so that shouldn't be the problem.

On one of the How-Tos it says:
Quote:The script launcher is based in the parameters settings of XBMC so go there to launch scripts.

Where do I find this script launcher? I remember a few years ago (still on the original X-Box) there was a Button on the Home-screen to launch scripts. But I can't find something like that anymore. I also tried "Programs" and the build in file manager to find and start my "hello.py" Wink... but that doesn't seem to work either.

Do I need to create an Addon to be able to run a script? Is there some kind of "Dummy"-Addon which can be used as a starting point? Or in other words: What is the most basic way to run a script in XBMC (like the examples described in the How-To: Open a window, put some text in, play around etc..)?
Reply
#2
In my repo (see http://wiki.xbmc.org/index.php?title=3rd...positories) - is a minimal plugin and a minimal script example for testing purposes. You could start there...it will give you the basic structure to get going at least.

There are likely much better ones (e.g. xbmcswift framework?) - but might be helpful to ya.

Googlecode repo has everything in it as well - http://code.google.com/p/bossanova808-xbmc-addons/

(I'd use github if I were doing it again though)
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#3
Thank you! Smile

So, I guess there isn't a "script launcher" anymore - or another build in way to launch a standalone script?

I tried some things from the how-tos - some did work as expected, some didn't (using a simple addon). What I really miss is a tutorial which explains a little bit more about the background (about configuration, classes, object creation or best practices, WHY do this (this way), etc.). On on hand really basic stuff about Python is explained - but on the other hand there isn't even really explained how to run a simple script. I know it's hard to find people/time to update the docs - but this way I think it's doing more harm than good. I guess I will have to "reverse engineer" existing addons to find out how things really work now. Wink
Reply
#4
Yep download something in the area you plan to work on and work from there....in the end I think that is how most of us did it.

It's not really too hard once you get past the basics of actually creating the structure/repo etc, which was (for me) the harderst part in a way (hence my having a minimal plugin/script - it gives me an easy starting point for testing things without much effort...). The actual python stuff is mostly fairly easy although could be way, way better documented. But hey, it's open source, kinda the nature of the beast..and part of the fun is figuring out the puzzle!

Good luck!
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply

Logout Mark Read Team Forum Stats Members Help
Getting started with Python and XBMC0