Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #6492

Re: changing current dir and executing a shell script

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <marduk@letterboxes.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.013
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'subject:changing': 0.07; '+0200,': 0.09; 'subject:current': 0.09; 'subprocess': 0.09; 'wrote:': 0.14; 'default).': 0.16; 'received:internal': 0.19; 'shell': 0.19; 'header:In-Reply-To:1': 0.21; 'received:10.202': 0.23; 'received:10.202.2': 0.23; 'received:66.111': 0.23; 'received:66.111.4': 0.23; 'received:messagingengine.com': 0.23; 'received:smtp.messagingengine.com': 0.23; 'problem': 0.28; 'sat,': 0.29; 'does': 0.33; 'to:addr:python-list': 0.33; 'all.': 0.35; 'there': 0.35; 'using': 0.35; 'change': 0.37; '(by': 0.37; 'but': 0.38; 'execute': 0.38; 'subject:: ': 0.38; 'received:192': 0.38; 'header:Mime-Version:1': 0.39; 'to:addr:python.org': 0.39; 'within': 0.60; 'message-id:@localhost.localdomain': 0.78
DKIM-Signature v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=subject:from:to:date:in-reply-to:references:content-type:content-transfer-encoding:message-id:mime-version; s=smtpout; bh=wI9oMzq3jviYDX6v++uG1ZIt4EU=; b=RCR/XWxzl5LfVjc6hgzSCOfMmegkMlZCEEGsbNgxB+7UTVXWp+E1Y5zT6T5xRDGZfYyZF3IFJUVxHa24XRtMajVmPpodnSEX0YuB1ao31KPpJwbiOoYwi3gOeKlWrujYLkZc+EKROyrOhyvd9VBJ++ycm13zJPzch5PWO2T/MZ4=
X-Sasl-enc pD7NAZV7f35i3jMwT/CAblRkvfChp/JaZ9RcyRh7zN77 1306619575
Subject Re: changing current dir and executing a shell script
From Albert Hopkins <marduk@letterboxes.org>
To python-list@python.org
Date Sat, 28 May 2011 17:52:55 -0400
In-Reply-To <irq904$233$1@solani.org>
References <c49d698b-183f-46a2-8367-c7db0761ba19@glegroupsg2000goo.googlegroups.com> <mailman.2178.1306534772.9059.python-list@python.org> <irq904$233$1@solani.org>
Face iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAAXNSR0IArs4c6QAAADBQTFRF1///CwsLGxsbJycnNzc3RUVFU1NTYmJicXFxf39/jIyMm5ubq6urubm5yMjI3t7eukg4JQAAAAF0Uk5TAEDm2GYAAAIoSURBVDhPpZC9btRQEEbPGIJQhOIZB4SEhGJ7W/42lihoKCJ6agoeglfgDXiQPAGEio5sKGgTLxRIFNk7DigV7FD4J4SW23jud+75ZA38x9ncnb3wf0PgjZnZdvo35rVZZWa3RiLDd+PGMNz5oABkw/2e9ne+HTgwGRt3nejHzc8Gk/EURfvx/IgLcK3YNZWB7C8vwFqtqcxEAPYD4CoAr5xUiBaJlfOrvTA+IRLqLhisWx/B9RItzckjHCJNxtqKGhRBgEiTAWCIBqGXDNBODEdBIWIEgquCiosD6GQsTYzAVVUAH0FCFDPP3ce8Byenx0hhFRBoX5cBFPXJUVILUog6rTOs5Mv5DnGyOAaXHMvb0fiU3z8QbNZAjmg5VXVbP/N0uHhyWJrAl8RYhebzVcq+K4CJ2WgomSbWsSsguRY6GtncD0N0EYImEcrRkPUxXcrKflNYN4LUmqKndQVOV5qOIDp5Vhb518oEqqxgBFuyOhSKlRF4NptPhp22Ee0ylnioNfVkPPLSix1SG9BJrRN4aFcevfNIKw8f8h5k8vtsnlUauSBiF2DD6/ePd5LPAOvzHpw97F6+dbHOk1T1X4DnXN2rlF+OWKXAuN3Cj3HHNW5u/13FzeQtEkv/YU0vDCATjZSn8KqZXwLdA3Kny+q6GZoGwPPFmZ5oNWt29TK4/XSVpK6bPRny4a+Qx1+FrNkrdATji/XHhdTbw55gMrC0TaFTEfwB/cbNxoZIacsAAAAASUVORK5CYII=
Content-Type text/plain; charset="UTF-8"
X-Mailer Evolution 3.0.1
Content-Transfer-Encoding 7bit
Mime-Version 1.0
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2204.1306619578.9059.python-list@python.org> (permalink)
Lines 11
NNTP-Posting-Host 82.94.164.166
X-Trace 1306619579 news.xs4all.nl 49041 [::ffff:82.94.164.166]:44982
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:6492

Show key headers only | View raw


On Sat, 2011-05-28 at 09:41 +0200, Peter Otten wrote:
> > You don't want to do this because "cd" is a built-in shell command,
> and
> > subprocess does not execute within a shell (by default).
> 
> The problem is not that cd is built-in, but that there is no shell at
> all. 
> You can change that with shell=True: 

This is exactly what I said, but using different words.

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

changing current dir and executing a shell script suresh <suresh.amritapuri@gmail.com> - 2011-05-27 14:25 -0700
  Re: changing current dir and executing a shell script Thorsten Kampe <thorsten@thorstenkampe.de> - 2011-05-28 00:18 +0200
  Re: changing current dir and executing a shell script Albert Hopkins <marduk@letterboxes.org> - 2011-05-27 18:19 -0400
    Re: changing current dir and executing a shell script Peter Otten <__peter__@web.de> - 2011-05-28 09:41 +0200
      Re: changing current dir and executing a shell script Albert Hopkins <marduk@letterboxes.org> - 2011-05-28 17:52 -0400

csiph-web