Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!selfless.tophat.at!news.glorb.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: suresh Newsgroups: comp.lang.python Subject: changing current dir and executing a shell script Date: Fri, 27 May 2011 14:25:52 -0700 (PDT) Organization: http://groups.google.com Lines: 15 Message-ID: Reply-To: comp.lang.python@googlegroups.com NNTP-Posting-Host: 169.235.17.37 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1306531553 23634 127.0.0.1 (27 May 2011 21:25:53 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 27 May 2011 21:25:53 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=169.235.17.37; posting-account=Q6FYUQoAAAAK21zFzPM6TEGh78LrUT3V User-Agent: G2/1.0 X-Google-Web-Client: true Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:6433 Hi, I want to execute the following command line stuff from inside python. $cd directory $./executable I tried the following but I get errors import subprocess subprocess.check_call('cd dir_name;./executable') Due to filename path issues, I cannot try this version. subprocess.check_call('./dir_name/executable') Any suggestions? thanks suresh