cgi, python and forms

Fredrik Lundh effbot at telia.com
Mon Mar 6 22:01:01 CET 2000


Akhar <akhar at videotron.ca> wrote:
> try:
>         try:
>                 form = cgi.FieldStorage()
>                 NField = form["nom"]
>                 SField = form["serial"]
>     except (KeyError, TypeError):
>                         print "ay t"
>                         raise SystemExit
>         try:
>                 N = NField.value
>                 S = SField.value
>     if form.has_key('name'):
>                 if form['name'].value=='Search':

> bash-2.03# python admin.py
>   File "admin.py", line 36
>     if form.has_key('name'):
>      ^
> SyntaxError: invalid syntax

statements that belong to the same block must
have the same indentation.

</F>





More information about the Python-list mailing list