[Tutor] software carpentry
Kent Johnson
kent37 at tds.net
Sat Feb 25 21:19:04 CET 2006
rio wrote:
> 2) Which debugger should I use if I do most of my work in XP with IDLE? Up
> til now I've just been using print statements. who knew?
I rarely use a debugger for Python. I write most code in very small
increments with lots of tests, so problems are generally very localized
and found by inspection or with a few print statements.
There is a simple debugger in IDLE. Winpdb is pretty nice for a
full-featured Python debugger.
http://www.digitalpeers.com/pythondebugger/
>
> 3) Before setting out to write in Spanish, for example, I´d of course read
> many dozens of books, while I'm setting out to write Python without having
> read anything more than a few tutorial examples. How and where do I look
> for (well-written) code? Is it a good idea to look in the standard
> libraries for ideas, or code to modify?
Yes, the standard library is a good place to look. I found the printed
Python Cookbook to be a valuable source of real-world examples and
common idioms.
> How are large applications usually
> organized, and how do you find a specific part of it?
Organize your code into packages, with each package responsible for a
cohesive part of the app. I use search a lot to find things :-)
I actually do most of my Python development in TextPad, a Windows text
editor. Python is so simple and streamlined that I don't feel the need
for a lot of tool support, as opposed to Java, for example, where
Eclipse or something like it seems essential.
> How can you find
> code specific to certain tasks?
google 'python xxx'
Kent
More information about the Tutor
mailing list