David Bear wrote:
> I'm attempting to use the cgi module with code like this:
>
> import cgi
> fo = cgi.FieldStorage()
> # form field names are in the form if 'name:part'
> keys = fo.keys()
> for i in keys:
> try:
> item,value=i.split(':')
> except NameError, Unboun
Kent Johnson wrote:
> Tim Hochberg wrote:
>
>>Kent Johnson wrote:
>>
>>>David Bear wrote:
>>>
>>>
I'm attempting to use the cgi module with code like this:
import cgi
fo = cgi.FieldStorage()
# form field names are in the form if 'name:part'
keys = fo.keys()
for i in ke
"David Bear" wrote:
> I'm attempting to use the cgi module with code like this:
>
> import cgi
> fo = cgi.FieldStorage()
> # form field names are in the form if 'name:part'
> keys = fo.keys()
> for i in keys:
> try:
> item,value=i.split(':')
> except NameError, Unbo
Tim Hochberg wrote:
> Kent Johnson wrote:
>
>>David Bear wrote:
>>
>>
>>>I'm attempting to use the cgi module with code like this:
>>>
>>>import cgi
>>>fo = cgi.FieldStorage()
>>># form field names are in the form if 'name:part'
>>>keys = fo.keys()
>>>for i in keys:
>>> try:
>>>
Tim Hochberg wrote:
> Kent Johnson wrote:
>> David Bear wrote:
>>
>>> I'm attempting to use the cgi module with code like this:
>>>
>>> import cgi
>>> fo = cgi.FieldStorage()
>>> # form field names are in the form if 'name:part'
>>> keys = fo.keys()
>>> for i in keys:
>>>try:
>>>
Kent Johnson wrote:
> David Bear wrote:
>
>>I'm attempting to use the cgi module with code like this:
>>
>>import cgi
>>fo = cgi.FieldStorage()
>># form field names are in the form if 'name:part'
>>keys = fo.keys()
>>for i in keys:
>>try:
>>item,value=i.split(':')
>>
David Bear wrote:
> I'm attempting to use the cgi module with code like this:
>
> import cgi
> fo = cgi.FieldStorage()
> # form field names are in the form if 'name:part'
> keys = fo.keys()
> for i in keys:
> try:
> item,value=i.split(':')
> except NameError, Unboun
Em Seg, 2006-04-10 às 11:29 -0700, David Bear escreveu:
> However, the except block does not seem to catch the exception and an
> unboundlocalerror is thrown anyway. What am I missing?
See http://docs.python.org/tut/node10.html :
"""
A try statement may have more than one except clause, to specif
I'm attempting to use the cgi module with code like this:
import cgi
fo = cgi.FieldStorage()
# form field names are in the form if 'name:part'
keys = fo.keys()
for i in keys:
try:
item,value=i.split(':')
except NameError, UnboundLocalError:
print "ex