unable to open text file
#1
Hi,

I am trying to open a text file using the following script, however it always returns IOError and I am very sure that the file that I intend to open is in the specified path :-

def SaveFile(data):
dialogProgress.create("File Dialog…", "\nOpening file")
try:
f = open("Q:\scripts\workfile.html")
except IOError:
dialogProgress.close()
xbmcgui.Dialog().ok('Error','\nCannot open file!')
else:
f.close()
dialogProgress.close()
return "true"
xbmcgui.Dialog().ok('closing file','\nDone!')
dialogProgress.close()
return "true"


Please help. Thanks!!
Reply

Logout Mark Read Team Forum Stats Members Help
unable to open text file0