Thanks a lot Best Regards, Yitzhak
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Beni Cherniavsky Sent: Sunday, January 24, 2010 2:12 PM To: Yitzhak Wiener Cc: Python in Israel Subject: Re: [Python-il] debugging Python On Fri, Jan 22, 2010 at 17:18, Amit Aronovitch <[email protected]> wrote: > > In case you did not try that yet, using an interactive interpreter is > tremendous help for testing out new ideas and especially when learning new > stuff. > Second that! > IDE's come with their own interactive prompts, but you always have the > included python shell (just type "python" at the command line), as described > in most tutorials. >[snip...] > Even easier solution - use ipython: has colors, improved history and much > much more. > IMHO, the interactive interpreter become tremendously more useful when it multi-line history, so that you can type a whole loop or function definition, try it out, and then recall and modify it with a single press. Unfortunately, 90% of python environments don't do this (e.g. the plain "python" interpreter) or do it wrong (e.g. ipython, which is is great in all other respects)... So I recommend you start out with IDLE which comes builtin with Python. It's not very fancy, but it does get multi-line history right! > IDE's also have graphic debuggers (probably built as wrappers around pdb). > Do not have much experience with the python IDE's mentioned in previous > posts. IDLE (the "standard" tk IDE included with python) has some debugging > support - single stepping and jumping through source files work nicely, but > last time I checked (long time ago) running programs with debug mode on in > IDLE is quite slow and tends to get it stuck. IDLE's GUI debugger sucks, don't use it. It's confusing and lets you do only very basic stuff. I still recommend you start with IDLE, due to its great interactive prompt. Learn to use the command-line pdb in "post-mortem" mode: http://docs.python.org/library/pdb.html All you need to get started debugging exceptions are "bt", "up", "down" and "p <expression>" to check variables and test pieces of code. If you must have a GUI debugger, see http://winpdb.org/about/. P.S. if you use Windows, http://pythonxy.com is an excellent "fat" distro which will give you tons of developement tools and packages, with one install and easy updates. P.P.S. see also http://stackoverflow.com/search?q=python+IDE. If you are not famaliar with StackOverflow - you should be! Many questions like this are already answered there, and if not, just ask them and you'll get quality answers in hours, or sometimes minutes! -- Beni Cherniavsky-Paskin <[email protected]> ______________________________________________________________________ DSP Group, Inc. automatically scans all emails and attachments using MessageLabs Email Security System. _____________________________________________________________________ ______________________________________________________________________ DSP Group, Inc. automatically scans all emails and attachments using MessageLabs Email Security System. _____________________________________________________________________ _______________________________________________ Python-il mailing list [email protected] http://hamakor.org.il/cgi-bin/mailman/listinfo/python-il
