Develop-test-debug cycle
Gustavo Niemeyer
niemeyer at conectiva.com
Wed Mar 20 09:27:50 EST 2002
Hi Dale!
[...]
> import sys
> sys.path.append("x:\\whereever")
> from wibbleModule import wibble
> wibs = wibble(args)
You could save this in a file and execute it with "python -i file.py".
[...]
> 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.
It seems to work here:
[niemeyer at ibook niemeyer]$ echo 'a = 1' > mod.py
>>> import mod
>>> mod.a
1
[niemeyer at ibook niemeyer]$ echo 'a = 2' > mod.py
>>> reload(mod)
<module 'mod' from 'mod.py'>
>>> mod.a
2
> How do others go about interactively debugging large Python OO-based
> systems?
Have you looked at pdb?
--
Gustavo Niemeyer
[ 2AAC 7928 0FBF 0299 5EB5 60E2 2253 B29A 6664 3A0C ]
More information about the Python-list
mailing list