[Zope] error with simple python script loop

Maciej Wisniowski maciej.wisniowski at coig.katowice.pl
Fri Nov 24 08:56:23 EST 2006


>
> Hi Jonathan, thanks for taking care of the problem. I have done the self test you do with the list. But everytime when something is written at last line, example return 'eof' (My example in the topic) the error did not occured - so the list gives me 2 and i will get 2 emails.
>   
So try without return, eg.:
1. create ZPT with id: 'counter'
2. edith 'counter' that it contains only '0'
3. Create Script (Python):
val = context.counter()
v = int(val)+1
context.counter.write(str(v))

and test this script with/without return.

Then see what value is in 'counter' ZPT.

I have always only +1 increment, and you?

-- 
Maciej Wisniowski


More information about the Zope mailing list