[Tutor] debugging a module from a Package with IDLE interpreter

Benoit Dupire bdupire@seatech.fau.edu
Tue, 03 Apr 2001 14:40:29 -0400


I am trying to debug a python program with IDLE... it's really a pain in
the neck..
Here is an example... i want to load src.chasm.loader (.py) to debug it.



Python 2.0 (#8, Oct 16 2000, 17:27:58) [MSC 32 bit (Intel)] on win32
Type "copyright", "credits" or "license" for more information.
IDLE 0.6 -- press F1 for help

>>> import src.chasm.loader
Traceback (innermost last):  <SNIP!>
ImportError: No module named setNavBehavior.py

### <<< A bug was found >>> ###
### <<< i fix the bug in my editor  >>>####
### << I want to (re) load src.chasm.loader to find the next bug>> ###

## Here are the tries to reload this f #%&?g  module.

>>> import src.chasm.loader
>>> dir(src.chasm.loader)
Traceback (innermost last):
  File "<pyshell#2>", line 1, in ?
    dir(src.chasm.loader)
AttributeError: loader
>>> dir (src)
['__all__', '__builtins__', '__doc__', '__file__', '__name__',
'__path__', 'chasm', 'resourceFiles']
>>> dir(src.chasm)
['__all__', '__builtins__', '__doc__', '__file__', '__name__',
'__path__', 'action', 'file', 'loaderException', 'loaderconst',
'navlibconst', 'state']


>>> import src.chasm
>>> dir(src.chasm)
['__all__', '__builtins__', '__doc__', '__file__', '__name__',
'__path__', 'action', 'file', 'loaderException', 'loaderconst',
'navlibconst', 'state']

# no change...

>>> from src.chasm import loader
Traceback (innermost last):
  File "<pyshell#7>", line 1, in ?
    from src.chasm import loader
ImportError: cannot import name loader

Do i miss something ?
The only thing I found is to kill the Python interpreter and to rerun
it.....

Thanks for any advice...


ben
--
Benoit Dupire
Graduate Student
----------------
I'd like to buy a new Boomerang. How can i get rid of the old one?