Hi,
Ensymble is a great tool to convert python scripts into sis files. It worked well for us for one script. For a second script the sisx is created. However, during execution the program aborts with the error code "-2". According to this url "http://www.newlc.com/Symbian-OS-Error-Codes.html" -2 stands for KErrGeneral
The following is the code... I suspect the lambda function to be problematic one. May be we need to include some headers files ? Please note the script is working correctly when launched from the python interpretor and doesn't execute after exported as sisx file using ensymble. Any sugggestions would be helpful.
--KrisCode:#!/usr/bin/env python import os import time """ Matrix-vector multiplication """ # variables z = 1000 # number of loop iterations m, n = 200, 300 vec = range(1, n+1) mat = [map(lambda x: i*n+x+1, range(n)) for i in range(m)] def matmult6(m, v): rows = len(m) w = [0]*rows irange = range(len(v)) sum = 0 for j in range(rows): r = m[j] for i in irange: sum += r[i]*v[i] w[j],sum = sum,0 return w for q in range(z): res = [] res = matmult6(mat, vec) print "i = ", q print "res = ", len(res)

Reply With Quote



