changing some lines in a file
Thomas Bryan
tbryan at arlut.utexas.edu
Tue Jul 6 13:13:02 EDT 1999
Peter Posselt Vestergaard wrote:
>
> Hi again, and thanks for your answer, but it doesn't seem to help.
> What I meant by stopping was that I have tried to put some prints
> different places(se below), and it won't print anything out after the
> problematic line.
It's *very* difficult to troubleshoot programs online without a lot
of information from you. Generally, we're not going to solve it,
we're just going to ask you so many questions that you'll eventually
find a bug in your code. :)
Does the program run to completion?
(If so, could you provide a sample input, output, and
values in Form? If not, does it exit with an exception,
or does it just run forever?)
Does it print something before the problematic line
and not after it? Or do neither print statements work?
Are you sure that Form has the data you think it has?
(That is, have you dumped Form before the for loop?)
Is found ever being set to 1?
This program looks like it's dealing with input from a
web form or an interactive session? Is that true?
Which one?
> db.close
By the way, you missed one of Gordon's remarks.
This line (and the db.close at the end) should be
db.close()
---Tom
More information about the Python-list
mailing list