mwpei
March 8th, 2009, 12:39 PM
Hello all,
I am working on updating my boxeevpn plugin to add a few new features but I am running into some basic problems.
As a starter, this is my first plugin/script for boxee so it is very simple, it uses the xbmcplugin.addDirectoryItem to provide buttons for people to press to start, stop, pause, restart, etc the VPN. each of these buttons results in an os.system call to preform the given action. It is a very basic plugin right now and I am looking at trying to make it better (and maybe learn a bit more in the process)
1. Debug process
a. Currently the only way I seem to be able to debug is to run my plugin in boxee (I do have a few unit level tests that I can run via command line but they are very limited). The problem that I am having is the print statements with in my code (for debug info) do not always output data to the boxee.log file, it seems like boxee does not always "run" my script. The boxee gui updates as expected but when I look at the boxee.log file I don't always see my debug print output (I have a print statement as the first thing the plugin does that says "boxeevpn script start" but it never gets printed, even though I know the script is running).
b. I am also finding that boxee seems to cache my script so I can not make a change then test it, make another change then test it again. I have to exit boxee, restart boxee, test it, exit, enter, test it again and so on.
2. Program questions
a. I want to add some configuration options, I see that you can include a settings.xml file as well as the language strings.xml. Is there a built in set of functions that I can uses to extract these settings? I see that someone used xbmc.getLocalizedString( 30900 ) to read a string from the strings.xml file, is there something simular for the setting.xml file?
b. I want to be able to display a "status" something like "VPN Running" or "VPN Stopped" etc. does anyone have any ideas how this could be done.
thanks
I am working on updating my boxeevpn plugin to add a few new features but I am running into some basic problems.
As a starter, this is my first plugin/script for boxee so it is very simple, it uses the xbmcplugin.addDirectoryItem to provide buttons for people to press to start, stop, pause, restart, etc the VPN. each of these buttons results in an os.system call to preform the given action. It is a very basic plugin right now and I am looking at trying to make it better (and maybe learn a bit more in the process)
1. Debug process
a. Currently the only way I seem to be able to debug is to run my plugin in boxee (I do have a few unit level tests that I can run via command line but they are very limited). The problem that I am having is the print statements with in my code (for debug info) do not always output data to the boxee.log file, it seems like boxee does not always "run" my script. The boxee gui updates as expected but when I look at the boxee.log file I don't always see my debug print output (I have a print statement as the first thing the plugin does that says "boxeevpn script start" but it never gets printed, even though I know the script is running).
b. I am also finding that boxee seems to cache my script so I can not make a change then test it, make another change then test it again. I have to exit boxee, restart boxee, test it, exit, enter, test it again and so on.
2. Program questions
a. I want to add some configuration options, I see that you can include a settings.xml file as well as the language strings.xml. Is there a built in set of functions that I can uses to extract these settings? I see that someone used xbmc.getLocalizedString( 30900 ) to read a string from the strings.xml file, is there something simular for the setting.xml file?
b. I want to be able to display a "status" something like "VPN Running" or "VPN Stopped" etc. does anyone have any ideas how this could be done.
thanks