User:Pline
Jump to navigation
Jump to search
This is a staging area for some rewrites to the Python add-on documentation. Ok, let's go!
Python add-ons
Hello, World!
Before we get started, let's look at an extremely basic example script:
# TODO
The entry point
The simplest form of Python add-on is one that gets run, adds some list items, and exits to let XBMC take over the navigation; people who have written server-side code for the web should be familiar with how this works. (More complex add-ons can process user input in real-time, but we'll discuss those later.) For add-ons like this, we can tailor the output based on the arguments passed into the add-on. These arguments are stored in sys.argv
:
Index | Description |
---|---|
0 | The base URL of your add-on, e.g. 'plugin://plugin.video.myaddon/'
|
1 | The process handle for this add-on, as a numeric string |
2 | The query string passed to your add-on, e.g. '?foo=bar&baz=quux'
|