On Sun, Dec 4, 2011 at 2:51 AM, wesley chun <wes...@gmail.com> wrote:
> > Does anyone else have similar stories? (I think I may be biased as I use > Python for everything, trouble or otherwise, so I can't tell the difference > anymore!) > I work in a .NET shop, and the last project I worked on required us to re-implement a report system that was doing a variety of complicated things (due to the nature of the older tech used). This required us to run and re-run our version to compare against the old, many many times. My teammate started doing the comparisons by hand using a merge tool... after watching that process for about 5 minutes, I went ahead and wrote a quick Python script (<30 lines) that would compare the two reports. I ended out extending the script to a full blown text-program with some nice menus and things, and all told probably spent less than an hour or two writing scripts that saved... probably at least 10 man hours of comparisons, probably much more than that when you factor in the exhaustion from doing such a menial task. The tools that I found extremely useful: 1) Modules - I used re and csv fairly heavily. One piece of the report was textual and the re module allowed me to easily parse out the important information from each report. The other one was a spreadsheet, so csv readers were quite nice 2) List comprehensions/generator expressions - mutating the data from text to something that I could really use took two or three passes. Being able to express this in two or three lines was invaluable 3) Syntax (including dynamic binding) - the terse syntax allowed me to express what I wanted to express, with no extra "stuff" (e.g. End With) Personally I wish I was in your shoes (using it for everything), but I'm a huge Pythonista so that should hardly be a surprise ;) (and definitely wouldn't be a surprise for any of my former classmates. I was quite the evangelist... and still am) -Wayne
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor