Script works in Windows, but not with Droid
#1
Can someone tell me why this code works in Windows, but not in Droid?

Code:
import xbmc, xbmcaddon, xbmcgui, xbmcplugin,os,sys
import shutil

save = ["Folder"]
path = xbmc.translatePath('special://home/addons/')

for content in os.listdir(path):
    #print(content)
    if os.path.isdir('{}{}'.format(path, content)):
        #print(content)
        if content not in save:
            print(content)
            shutil.rmtree('{}{}'.format(path, content))
Reply
#2
I am modifying the Hello World script found here http://forum.kodi.tv/showthread.php?tid=209948
Reply
#3
Does anyone have a clue?
Reply
#4
If no one knows why this doesn't work in Droid, can someone tell me a better method to save a certain folder while deleting others?
Reply
#5
The Python version on Android is currently Python 2.6.

Please try using
Code:
'{0}{1}'.format(path, content)
and a debug log would be helpful here along with the code.
Reply

Logout Mark Read Team Forum Stats Members Help
Script works in Windows, but not with Droid0