def __init__(self, window): self.window = window # only get nodes from the 'downstairs' folder args = ['plugin://plugin.program.isybrowse/','4','?addr='+ _isyfolder + '&browsing=nodes&type=folder'] isyshared.initialize(args) self.isy = isyshared.isy self.nodes = self.isy.BrowseNodes(_isyfolder) xbmc.log('nodes:' + str(self.nodes)) self.buttons = {}
but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA """ import breve import math import gc import seed import shared shared.initialize(seed.environment) #Set up the simulation's shared data. import colony import map import inerts import agents import time class System(breve.Control): """ A control class, as required by breve for the execution of Python code. """ _field = None #: The current state of the system's field, which contains everything. _tick = 0 #: The current discrete time-step of the system. def __init__(self):
# IMPORTS # system import sys # xbmc import xbmcaddon # custom lib_path = xbmcaddon.Addon('plugin.program.isybrowse'). \ getAddonInfo('path') + '/resources/lib/' sys.path.append(lib_path) import shared import actions import menus # MAIN LOOP if __name__ == "__main__": # initialize shared library shared.initialize(sys.argv) if shared.__params__['cmd'] is not None: # an action was requested actions.DoAction(shared.__params__['addr'], shared.__params__['cmd']) actions.RefreshWindow() else: # a folder was requested menu = menus.main(shared.__id__, shared.__params__['browsing'], shared.events_enabled(), shared.__params__['addr']) menu.sendToXbmc() menu.show()