[Zope] error with simple python script loop

Christian Steinhauer steinhauer at know-it.net
Fri Nov 24 20:21:19 EST 2006


>>
>>http://www.blunck.se/iehttpheaders/iehttpheaders.html
>>

What a nice tool. Now more debugging with some interesting results. 

###
for i in range(2):
  context.MailHost.send('bodytext', "rec at mail.com", "sender at mail.com",
'subj'+str(i))
###
This script produces: HTTP/1.1 204 No Content

###
for i in range(25):
  subj = str(i+1) + ' range python'
  context.MailHost.send('Range Python', "rec at mail.com", "sender at mail.com",
subj)
###
This script produces: HTTP/1.1 204 No Content

###
for i in range(2):
  context.MailHost.send('bodytext', "rec at mail.com", "sender at mail.com",
'subj'+str(i))
  context.emailcounter.write(str(int(context.emailcounter())+1))
###
This script produces: HTTP/1.1 200 OK

The third script has no output on the screen too but works fine and gives
HTTP Code 200 back. Can you tell me why he do this?



More information about the Zope mailing list