Christian Steinhauer wrote:
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', [EMAIL PROTECTED], [EMAIL PROTECTED],
'subj'+str(i))
###
This script produces:
context.MailHost.send('bodytext', [EMAIL PROTECTED],
[EMAIL PROTECTED],
'subj'+str(i))
###
This script produces: HTTP/1.1 204 No Content
Moral of the story: if you want sane things to happen, make sure your
script returns a string output.
Otherwise you risk tickling some of the more
This script is the part of the devil ;) It has produce the double emails, i
have cut some lines codes to get it faster to understand.
Have you tried what I posted before? I mean try to add to your script:
container.REQUEST.RESPONSE.setHeader('content-type', 'text/html')
I'm curious if this
Chris Withers wrote at 2006-11-27 16:16 +:
...
Moral of the story: if you want sane things to happen, make sure your
script returns a string output.
In fact, an empty string would result in the same behaviour.
Thus, the moral should be: make your your script does not return
a Python false
Have you tried what I posted before? I mean try to add to your script:
container.REQUEST.RESPONSE.setHeader('content-type', 'text/html')
I'm curious if this changes anything.
yes i test this and then the header is everytime 200 OK - so no problem. But
i test this only with my 2 lines of code
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?
This is because of call to ZPT in your third script. ZPT call sets
RESPONSE HTTP headers with content/type='text/html'. Try this:
for i in range(2):
I have an problem with this little script. The script is in the zope
file structure and it is an -Script (Python)-
The script should send 2 emails over the mailhost, but it sends 4
emails. I have test this with maildrophost product too, same problem. I
have test it on Zope 2.10.0 and Zope 2.64.
Christian Steinhauer wrote:
This script produce the error:
start
for i in range(2):
subj = str(i) + ' range python'
context.MailHost.send('range test with python', [EMAIL PROTECTED],
[EMAIL PROTECTED], subj)
end
As I said in the tracker, no one can help you if you
The script should send 2 emails over the mailhost, but it sends 4
emails. I have test this with maildrophost product too, same problem. I
have test it on Zope 2.10.0 and Zope 2.64. The problem is the same -
everytime.
How do you call this script? Directly (via URL)? Or it is called
by
As I said in the tracker, no one can help you if you don't
actually give us the full traceback and exception that you got.
There is no traceback, i got no error - thats why i have post it into
bug tracker. I spoke to many people but no one can tell me why it
occured. The most said that it
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
- --On 24. November 2006 13:39:07 +0100 Christian Steinhauer
[EMAIL PROTECTED] wrote:
As I said in the tracker, no one can help you if you don't
actually give us the full traceback and exception that you got.
There is no traceback, i got no
- Original Message -
From: Christian Steinhauer [EMAIL PROTECTED]
To: zope@zope.org
Sent: Friday, November 24, 2006 7:12 AM
Subject: [Zope] error with simple python script loop
I have an problem with this little script. The script is in the zope
file structure and it is an -Script
I just cut and pasted your code into a python script on my
Zope installation
(2.9.2) and it worked as expected (ie. 2 emails sent). So
something is
pooched in your installation.
A quick way to check to see if your script is looping more
than you expect
is to do something like:
loopCheck =
- Original Message -
From: Christian Steinhauer [EMAIL PROTECTED]
To: Jonathan [EMAIL PROTECTED]; zope@zope.org
Sent: Friday, November 24, 2006 8:19 AM
Subject: Re: [Zope] error with simple python script loop
I just cut and pasted your code into a python script on my
Zope
I tried to reproduce your '4 iteration' problem on my Zope 2.9.2
installation, but even by removing the 'return' statement I
still got 2 loop
iterations (and 2 emails).
I have never written a python script that did not have a
'return' statement.
I don't know if it is mandatory or not. I
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
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 24 Nov 2006, at 14:38, Jonathan wrote:
I have never written a python script that did not have a 'return'
statement. I don't know if it is mandatory or not. I usually use
python scripts as subroutines/functions and I always have a return
17 matches
Mail list logo