I was wrong!
Now it works fine! Thank you!
I have another similar script where the print HTTP headers statement is in a
previous line... In this one it is not the case. Sorry for my inconvenience!
Paulino
Citando wesley chun [EMAIL PROTECTED]:
paulino,
mike and michael are correct.
7 print 'htmlbrbrbodypPlease enter values in the
fields/p/body/html '
When the excption occurs, no message is shown on the browser.
If I run the script with IDLE, the message is printed and then the script
exits.
import cgitb; cgitb.enable()
That spits errors to the web
On 10/21/06, Paulino [EMAIL PROTECTED] wrote:
Mike Hansen
Mike.Hansen at atmel.com
Mon Oct 16 18:43:29 CEST 2006
This is a peace of a CGI script i have. 1 import cgi 2 form=cgi.FieldStorage() 3 try : 4 ano=form[ano].value
5 conta=form[conta].value 6
Mike Hansen
Mike.Hansen at atmel.com
Mon Oct 16 18:43:29 CEST 2006
This is a peace of a CGI script i have.
1 import cgi
2 form=cgi.FieldStorage()
3 try :
4 ano=form["ano"].value
5 conta=form["conta"].value
6 except KeyError :
7 print
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paulino
Sent: Sunday, October 15, 2006 10:10 AM
To: tutor@python.org
Subject: [Tutor] Exception and sys.exit() in a cgi script
This is a peace of a CGI script i have.
1 import cgi
2 form
This is a peace of a CGI script i have.
1 import cgi
2 form=cgi.FieldStorage()
3 try :
4 ano=form[ano].value
5 conta=form[conta].value
6 except KeyError :
7 print 'htmlbrbrbodypPlease enter values in the
fields/p/body/html '
8 sys.exit(0)
When the excption occurs, no message is
Hi Paulino,
This is a peace of a CGI script i have.
1 import cgi
2 form=cgi.FieldStorage()
3 try :
4 ano=form[ano].value
5 conta=form[conta].value
6 except KeyError :
7 print 'htmlbrbrbodypPlease enter values in the
fields/p/body/html '
8 sys.exit(0)
When the
Thank you,
Yes I have other scripts working fine.
The OS is WXP and the server is the python's CGIHTTPserver (for an intranet use only)
-
Hi Paulino,
This is a peace of a CGI script i have.
1 import cgi
2 form=cgi.FieldStorage()
3 try :
4 ano=form["ano"].value
5