Glenn> On 12/4/2010 3:07 PM, Paul Moore wrote:
    >> The original goal was for subprocess to replace os.system, os.popen,
    >> os.spawn, etc. That's never quite happened because subprocess is just
    >> a little bit too conceptually complex for those basic tasks.

    Glenn> Is that way?  I didn't find it particularly hard to learn, given
    Glenn> the "cheat sheet" of techniques for doing the replacements.

For 99% of my usage (I suspect for most other peoples' as well, at least on
Unix-y systems), this is all I need:

    for line in os.popen("some pipeline"):
        do_stuff(line)

No cheat sheet necessary.  I don't see how subprocess could have made that
common idiom any simpler.  Maybe it's better at doing esoteric stuff,
however that falls into the 1% where a simple os.popen isn't adequate.

Skip
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to