Solved Writing files
#1
Question 
How do you write a file?

I'm getting:

Quote:IOError: (22, "invalid mode ('w') or filename", 'special://profile/addon_data/my.addon/test.txt')

I'm using:

Code:
text_file = open('special://profile/addon/addon_data/my.addon/test.txt', "w+")
text_file.write("hello")
text_file.close()
Reply
#2
you cannot use python fileio on vfs paths. pass the path through xbmc.translatePath() first.
Reply
#3
(2016-01-12, 15:44)ironic_monkey Wrote: you cannot use python fileio on vfs paths. pass the path through xbmc.translatePath() first.

Thanks, it's working now.
Reply

Logout Mark Read Team Forum Stats Members Help
Writing files0