Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!dedekind.zen.co.uk!zen.net.uk!hamilton.zen.co.uk!reader01.nrc01.news.zen.net.uk.POSTED!not-for-mail From: Nobody Subject: Re: Moving folders with content Date: Sun, 16 Sep 2012 15:31:07 +0100 User-Agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.) Message-Id: Newsgroups: comp.lang.python References: <5055ac92$0$6940$e4fe514c@news2.news.xs4all.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Lines: 20 Organization: Zen Internet NNTP-Posting-Host: f209a2dd.news.zen.co.uk X-Trace: DXC=CJcdB?Cb5[FgN9e0JNPkjOa0UP_O8AJoL=dR0\ckLKG@WeZ<[7LZNRF;^>bE\k^nkHM2Z^cWRFGAKJ:^onDYDn But you should get into the habit of using shell=False whenever > possible, because it is much easier to get it right. More accurately, you should get into the habit of passing a list as the first argument, rather than a string. On Unix-like systems (including Mac OS X), this effectively requires shell=False. Passing a list with shell=True has behaviour which is well-defined, but rarely useful (the first element of the list will be executed as a shell command, the remaining elements will be available via the shell variables $1, $2, etc within that command). On Windows, the list is converted to a command string using the same quoting rules regardless of the value of the shell= parameter. The difference is that shell=False requires the "executable" to actually be a binary executable, while shell=True allows it to be some other type of file (e.g. a batch file, Python script, etc).