On May 8, 6:09 pm, Jason <rsfr... / yahoo.com> wrote:
> I use Python.
Hey, J. I heard that attempting to program in
Python is like trying to scratch your ass while
wearing a straitjacket. Is that true? If it is, then
why do you do it? Do you enjoy that sort of thing?
Let's give you something really easy to try.
Well, o.k., it would be really easy for languages
that are designed to enable the programmer,
not to hobble him. So I guess it won't be so
easy in Python.
Let's say we're doing some intense calculations
and we want to show a simple progress indicator:
40.times {
print "."
time_consuming_routine
}
puts "\nFinished."
And the output is
........................................
Finished.
Simple. (Note that there are no spaces between
the periods.) Doing it in awk is also straightforward.
for (i=0; i<40; i++)
{ printf "."
time_consuming_routine()
}
print "\nFinished."
Can you figure out how to do this trivial task
in Python?