2004-07-10, 10:21
hello,
i am neewbe with python, although i have programmed before in other languages.
i'm trying to program an script that reads a file from smb. i have read the posts here, but i don't find the right solution. i have done this:
#############################
class myclass(xbmcgui.window):
def (self):
titol = ''
imatge = ''
path = 'smb://xarxa;xbox:xbox@athlon/dvdrom'
config_file = path + '/config.xml'
imatge = '/media/wallpaper.jpg'
file = open(config_file)
self.addcontrol(xbmcgui.controlimage(0,0,800,600, path + imatge))
....
#############################
i got 2 problems here:
1st: at line "file = open(config_file)" i get the error that config_file is not a valid file . how can i acces to this file to be readed?
2nd: if i comment out the line before, i don't see the image and i can acces to it by files -> dvdrom (via smb). why i can't see the image when running my script?
thank you in advance,
gonella
i am neewbe with python, although i have programmed before in other languages.
i'm trying to program an script that reads a file from smb. i have read the posts here, but i don't find the right solution. i have done this:
#############################
class myclass(xbmcgui.window):
def (self):
titol = ''
imatge = ''
path = 'smb://xarxa;xbox:xbox@athlon/dvdrom'
config_file = path + '/config.xml'
imatge = '/media/wallpaper.jpg'
file = open(config_file)
self.addcontrol(xbmcgui.controlimage(0,0,800,600, path + imatge))
....
#############################
i got 2 problems here:
1st: at line "file = open(config_file)" i get the error that config_file is not a valid file . how can i acces to this file to be readed?
2nd: if i comment out the line before, i don't see the image and i can acces to it by files -> dvdrom (via smb). why i can't see the image when running my script?
thank you in advance,
gonella