How to use Python well?

snorble snorble at
Wed Feb 16 19:35:28 CET 2011

I use Python a lot, but not well. I usually start by writing a small
script, no classes or modules. Then I add more content to the loops,
and repeat. It's a bit of a trial and error learning phase, making
sure I'm using the third party modules correctly, and so on. I end up
with a working script, but by the end it looks messy, unorganized, and
feels hacked together. I feel like in order to reuse it or expand it
in the future, I need to take what I learned and rewrite it from

If I peeked over a Python expert's shoulder while they developed
something new, how would their habits differ? Do they start with
classes from the start?

I guess I'm looking for something similar to "Large Scale C++ Software
Design" for Python. Or even just a walkthrough of someone competent
writing something from scratch. I'm not necessarily looking for a
finished product that is well written. I'm more interested in, "I have
an idea for a script/program, and here is how I get from point A to
point B."

Or maybe I'm looking for is best practices for how to organize the
structure of a Python program. I love Python and I just want to be
able to use it well.

More information about the Python-list mailing list