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
> > > 7 print 'Please enter values in the
> > > fields '
> > >
> > > 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"].v
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 'Please
> -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
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
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 'Please enter values in the
> fields '
> 8 sys.exit(0)
>
>
> When the excption occ
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 'Please enter values in the
fields '
8 sys.exit(0)
When the excption occurs, no message is shown on the browser.