Develop-test-debug cycle

Dale Strickland-Clark dale at riverhall.NOTHANKS.co.uk
Wed Mar 20 08:32:56 EST 2002


I can't believe I'm doing this this best way.

I am debugging a large system written in Python with modules spread
over 4 directories. I'm using PythonWin under Win2K to set-up the
environment and run the code.

Setting up the environment typically involves the following commands:

import sys
sys.path.append("x:\\whereever")
from wibbleModule import wibble
wibs = wibble(args)

wibs.methods(args)

<error...>

At this point, I fix the error.

Now, I haven't figured out a way of continueing past this point
without quiting and starting from scratch because there appears to be
no way to get Python to reload a module. The reload() function doesn't
do it.

I've tried stuff like this:

del wibs
reload(sys.modules['wibbleModule']

but I still seem to have the old version loaded.

I've also tried using PyCrust for this but it suffers from the same
problems. I assume IDLE does too.

How do others go about interactively debugging large Python OO-based
systems?

Thanks for any pointers.
--
Dale Strickland-Clark
Riverhall Systems Ltd



More information about the Python-list mailing list