debugging inside pycrust

Hi,

I'm creating a simple data analysis ide, which includes a pycrust shell to execute python scripts. That's working OK. But I'd like to be able to offer some very simple debugging, like the pdb module. If I just run a python.exe shell, I can use pdb to debug some of my sample data analysis scripts. But if I do *exactly* the same thing in the pycrust window of my app, the debugger *seems* to start ok, and I get a pdb prompt when I call pdb.run(), but when I enter any pdb command, such as continue, I get the following:

import pdb
import getdata
pdb.run('getdata.main()')

<string>(1)?()

(Pdb) c
Traceback (most recent call last):
  File "<input>", line 1, in ?
  File "C:\Python23\lib\pdb.py", line 979, in run
    Pdb().run(statement, globals, locals)
  File "C:\PYTHON23\lib\bdb.py", line 350, in run
    exec cmd in globals, locals
  File "<string>", line 1, in ?
NameError: name 'getdata' is not defined

I can enter the command getdata.main() and it works fine.

Is there something I can do to allow pdb and pycrust to work happily together?

Is there some other approach that would give me rudimentary debugging within pycrust?

Env: winxp, python 2.3.2, wx 2.4.2.4 (because I built with boa)

-kc