On Fri, 6 May 2005, D. Hartley wrote:
> Hey guys,
>
> I wrote the following function, and if I do it line-by-line in the
> interpreter, each line works exactly as it should. However, when I
> run the function by its name, nothing happens. It doesnt print the
> print statement, it doesnt give me an error, it just goes to the next
> >>> line. This is probably an easy fix, but I traced through it about
> twelve times and can't figure out why it's not doing what it should.
> The pdb debugger didnt give me anything I could actually read.
>
> Any ideas?
>
> def urlsearch():
> x = 12345
> count = 0
> # pdb.set_trace()
> while count > 10:
If count is set to 0 above, then this will never happen because 0 is
not > 10.
> param = urllib.urlencode({'nothing': x})
> f =
> urllib.urlopen("http://www.pythonchallenge.com/pc/def/linkedlist.php?%s"
> % param)
> text = f.read()
> print text
> lister = string.split(text)
> x = lister[-1]
> count = count + 1
>
> Thanks :)
> ~Denise
> _______________________________________________
> Tutor maillist - [email protected]
> http://mail.python.org/mailman/listinfo/tutor
>
--
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor