Newbie questions on pdb

Fred Clare fred at balzac.scd.ucar.edu
Tue Jun 6 18:32:34 EDT 2000


I have read the sections on pdb in Lutz's "Learning Python,"
in Beazley's "Essential Reference" and in the Library Reference on
python.org, and I still do not understand how to use it in even
the simplest of all cases.  For example, suppose I have a python
module "test.py" that is:

 a = 1
 b = 2
 c = 3

How do I use pdb to step through this module a line at a time?

I do

>>> import pdb
>>> import test
>>> pdb.run("test")

At this point I get

  <string>(0)?()

What does this mean?  Nobody seems to explain the symbols in
this line.

I then do a 

  b 1

and get

  End of file

The books talk about setting break points in "the current file."
What is the current file in a case like the above?  Or in any case?

-- 
Fred Clare
fred at ucar.edu



More information about the Python-list mailing list