On Monday, August 13, 2012 12:35:05 AM UTC+10, Anthony wrote:
>
> Are you able to pickle the object outside of web2py (i.e., is the object
> generally pickleable, but fails only in web2py)?
>
> Didn't occur to me, but have now tested it - Yes, I can pickle it with the
re.finditer line.
--
Are you able to pickle the object outside of web2py (i.e., is the object
generally pickleable, but fails only in web2py)?
http://docs.python.org/library/pickle.html#what-can-be-pickled-and-unpickled
Anthony
On Sunday, August 12, 2012 9:59:15 AM UTC-4, Web2py Mostly Newbie wrote:
>
> Replaced me
Replaced method by:
def initNewLines(self):
self.newlines = []
for i in range(len(self.raw)):
if self.raw[i:i+1]=='\n':
self.newlines.append(i)
And no more complaints from web2py.
Would like to know what the problem is though.
--
It seems to be caused by the presence of:
nlIter = re.finditer('\n',self.raw)
in one of the methods of one of the class methods.
So, I moved the work to a separate function (not method):
def initNewLines(self):
self.newLines = findNewLines(self.raw)
def findNewLines( searchIn):
4 matches
Mail list logo