How to debug python code?

Thomas Guettler niemand.leermann at thomas-guettler.de
Fri Mar 31 08:50:47 EST 2006


Am Thu, 30 Mar 2006 21:18:50 -0800 schrieb sushant.sirsikar:
> hi,
>        I am new to Python programming.I am not getting exactly pdb.Can
> anyone tell me effective  way to debug python code?

Hi,

I try to debug the code while I type: Use "assert".

Then if you get an AssertionError you can insert print statements or 
  raise("var=%s var2=%s" % (var, var2))
to narrow down the problem. I never used pdb.

 HTH,
  Thomas

-- 
Thomas Güttler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de
Spam Catcher: niemand.leermann at thomas-guettler.de




More information about the Python-list mailing list