[Python-3000] os.popen versus subprocess.Popen

Andrew McNabb amcnabb at mcnabbs.org
Tue Apr 22 19:42:48 CEST 2008


On Tue, Apr 22, 2008 at 12:57:56PM -0300, Facundo Batista wrote:
> 
> - Why can't I write "ls -l", instead of ["ls", "-l"] (people ends
> writing "ls -l".split())

That's the best thing about subprocess.  Whenever I've used APIs that
accept a single string instead of list of arguments, I've quickly
descended into quoting hell.


-- 
Andrew McNabb
http://www.mcnabbs.org/andrew/
PGP Fingerprint: 8A17 B57C 6879 1863 DE55  8012 AB4D 6098 8826 6868
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-3000/attachments/20080422/59acbf3e/attachment.pgp>


More information about the Python-3000 mailing list