problem with python script
#1
Hi,

I'm an Italian boy beginners with python and XBMC.
I have prepared a computer with Ubuntu 10.04, xbmc 9.11, eclipse with pydev.
I started reading the wiki for write scripts, but copying the examples in a file and trying to start it in the dedicated section, didn't works.

Emanuele
Reply
#2
Don't much information, but I guess it fails when importing a xbmc module.
Code:
import xbmc
scripts depended on this module must be executed in XBMC environment to run
Reply
#3
this is the script :

display.py
Code:
import xbmc, xbmcgui

#get actioncodes from keymap.xml
ACTION_PREVIOUS_MENU = 10

class MyClass(xbmcgui.Window):
def onAction(self, action):
if action == ACTION_PREVIOUS_MENU:
self.close()
mydisplay = MyClass()
mydisplay .doModal()
del mydisplay

maybe I have to use the svn version of xbmc and not the xbmc live version?

sorry for my stupid question but I'm newbie
Reply
#4
how do you runing the script?
Reply
#5
Also, what does the xbmc.log state when attempting to run the script?
Reply
#6
now it works ... that may be wrong syntax?
I imagine it is essential to leave the spaces ...
Reply
#7
yes.. the indentations are very important to python...
Reply
#8
thanks for your help.

Emanuele
Reply

Logout Mark Read Team Forum Stats Members Help
problem with python script0