Kodi Community Forum

Full Version: Is it possible to run a program, and control it via a addon?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Before I even start to work on learning how to write my own addon, I want to know if it is even possible to control a program like pianobar?
Had a quick look at it ... It has a command line interface so in principal yes you can. Pythons subprocess is what you are looking for and then use call, check_output or popen depending on your needs. Depending on the output you might end up doing some string parsing. Regex etc.
Generally speaking you can integrate what you want if it comes with an interface. Http bindings ala REST, a python lib or like in your case a command line interface. Pure GUI apps are problematic to impossible to integrate.