I keep getting "List index out of range" when trying to execute this code, but for the life of me I cannot figure out why, If anyone has any experience coding linux gDesklets this would help.
File: StockWatcher.display
...
parser.dataSet = stockInfo.html
...
stockInfo.html is an object containing a CSV string "Some Company,127.2,+0.33%"
File: __init__.py
...
def __setData(self, csvData):
for row in csv.reader(csvData):
self.__name = row[0]
self.__currentvalue = row[1]
self.__changepercent = row[2]
if (match("+", row[2])):
self.__changecolor = "green"
self.__imagename = "gfx/gain.png"
if (match("-", row[2])):
self.__changecolor = "red"
self.__imagename = "gfx/loss.png"
...
dataSet = property(None, __setData, None)
...
Any thoughts?
Thanks!