Debugging on windows via print statements -- reliable?

Nick Arnett narnett at mccmedia.com
Mon Mar 25 00:37:14 EST 2002


> -----Original Message-----
> From: python-list-admin at python.org
> [mailto:python-list-admin at python.org]On Behalf Of Peter Hansen


[snip]

> By the way, how can Python code get "stuck"?  Is it a logic flaw,
> or are you talking about the kind of "stuck" that used to happen,
> in the "old days", when we were always writing code in languages
> which would actually crash the computer?

I'm using these vague adjectives because I can't tell what is happening.
Somewhere in the midst of retrieving pages with urllib and parsing them with
sgmllib, everything seems to stop.  And yes, it's a console app for the
moment.  I have a GUI that'll control it, but I'm working on pieces that
grab web pages, extract data and stick them in MySQL.  The only thing I'm
sure of is that it's not a problem with the database.  It happens at a
different point each time, sometimes after a few dozen pages, sometimes
after a couple of hundred.  And I can re-do the same sequence of pages and
it'll freeze/loop/stop/whatever at a different point each time.  The process
is alive, there's no memory size change and it's consuming very few CPU
cycles when this happens.

I'm working in PythonWin and I would have hoped that "break into running
code" would get me into it when this happens, so I could see where it's
getting stuck, but no, that would apparently be too convenient.

Nick





More information about the Python-list mailing list