On Thu, Jun 12, 2014 at 1:30 AM, Chris Angelico <ros...@gmail.com> wrote:

> On Thu, Jun 12, 2014 at 7:58 AM, Ryan <rym...@gmail.com> wrote:
> > In all seriousness, to me this is obvious. When you pass a command to the
> > shell, naturally, certain details are shell-specific.
>

On Windows cmd.exe is used by default:
http://hg.python.org/cpython/file/38a325c84564/Lib/subprocess.py#l1108
so it makes sense to make default behavior cross-platform.


>  > -10000. Bad idea. Very bad idea. If you want the ^ to be escaped, do it
> > yourself. Or better yet, don't pass shell=True.
>
> Definitely the latter. Why pass shell=True when executing a single
> command? I don't get it.
>

This is a complete use case using Rietveld upload script:
http://techtonik.rainforce.org/2013/07/code-review-with-rietveld-and-mercurial.html

I am interested to know how to modify upload script without kludges:
https://code.google.com/p/rietveld/source/browse/upload.py#1056
I expect many people are facing with the same problem trying to wrap
Git and HG with Python scripts.
-- 
anatoly t.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to