Alloy
Alloy

Reputation: 418

How can I run a python script from within Kodi?

If I want to make a button in Kodi's menu and run a local python script upon clicking it, what's the best way to go about it?

Upvotes: 0

Views: 2168

Answers (1)

toall1985
toall1985

Reputation: 34

file_path = xbmc.translatePath(os.path.join('insert path here to file you want to run')) xbmc.executebuiltin("XBMC.RunScript("+file_path+")")

Very late reply but saw no one else had answered so though i'd put in just in case

Upvotes: 1

Related Questions