On Sat, Sep 21, 2013 at 12:31 PM, Roy Smith <r...@panix.com> wrote: > In article <mailman.192.1379694881.18130.python-l...@python.org>, > Chris Angelico <ros...@gmail.com> wrote: > >> On Sat, Sep 21, 2013 at 2:28 AM, Aseem Bansal <asmbans...@gmail.com> wrote: >> > I hope that cleared some confusion about what I wanted to ask. I wanted to >> > gauge myself to find if I am progressing or not. >> >> Well, based on my definition, that's easy to answer. Have you solved >> problems using Python? If you have a bunch of HTML pages and you need >> to get some info out of all of them by COB today, do you think "I can >> do that with Python", or do you think "I can do that with sed, awk, >> grep, and five levels of pipe"? The tools you use for an urgent job >> will be the ones you know. > > The fact that you reach for traditional command-line tools to parse HTML > should not be taken as evidence that you don't know Python. It should > be taken as evidence that you have a lot of tools in your quiver and > know when to use the right one. > > I started with Python in the 1.4 days. I will reach for Python these > days in preference to Perl, Tcl, C, C++, Java, or PHP for most things. > But, for a lot of basic text processing, I can throw together a sed, > awk, grep, sort, uniq, wc, tac, tail, etc pipeline faster than I can > write a Python program to do the same thing.
Oh, absolutely! I never said that sed/awk/grep was a bad way to do things; my point is that, when there are dozens of viable solutions to a problem and you have to solve that problem *now*, you are going to reach for the one you know best. I use sed all the time (it's one of the easiest ways to edit a root-owned file from a non-root shell script - 'sudo sed -i'). ChrisA -- https://mail.python.org/mailman/listinfo/python-list