Differences

This shows you the differences between two versions of the page.

Link to this comparison view

default.py [2017/03/12 19:24]
0.0.0.0 created
default.py [2017/03/16 17:40] (current)
cvh
Line 1: Line 1:
 ====== Default.py ====== ====== Default.py ======
- 
-======Introduction====== 
 default.py contains the main Python code of an addon. default.py contains the main Python code of an addon.
 This document describes sample code that may be used in default.py. This document describes sample code that may be used in default.py.
-======xbmc.python.script Addon====== + 
-======xbmc.service Addon====== +====== xbmc.python.script Addon ====== 
-=====Common===== +... 
-====Open Addon Settings on First Run==== +====== xbmc.service Addon ====== 
-=====system.d Service Addon===== +... 
-====Restart Service when Settings are Changed====+===== Common ===== 
 +... 
 +==== Open Addon Settings on First Run ==== 
 +... 
 +==== system.d Service Addon ==== 
 +... 
 +==== Restart Service when Settings are Changed ==== 
 The code below restarts the system.d service of an addon when settings of the The code below restarts the system.d service of an addon when settings of the
 addon are changed. addon are changed.
- <nowiki> +<code>import subprocess
-import subprocess+
 import xbmc import xbmc
 import xbmcaddon import xbmcaddon
Line 29: Line 33:
  
 if __name__ == '​__main__':​ if __name__ == '​__main__':​
-Monitor().waitForAbort()</​nowiki>+Monitor().waitForAbort()</​code>