Nick Coghlan <ncogh...@gmail.com> added the comment: Unfortunately, I don't think including implicit shlex.quote() calls is going to have the effect I was originally looking for:
>>> subprocess.call("du -hs ../py*", shell=True) 593M ../py3k 577M ../py3k_pristine 479M ../python27 300M ../python31 381M ../python32 288K ../python_swallowed_whole 0 >>> subprocess.call("du -hs {}".format(shlex.quote("../py*")), shell=True) du: cannot access `../py*': No such file or directory 1 However, tinkering with this did provide some other "feels like using the shell" examples: >>> subprocess.call("du -hs ~/devel", shell=True) 4.5G /home/ncoghlan/devel 0 >>> subprocess.call(["du","-hs","~/devel"]) du: cannot access `~/devel': No such file or directory 1 (I'm using the existing subprocess calls rather than the proposed API, since I'm playing with this on the current hg tip without making any changes) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13238> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com