Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #6433
| 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 <suresh.amritapuri@gmail.com> |
| 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 | <c49d698b-183f-46a2-8367-c7db0761ba19@glegroupsg2000goo.googlegroups.com> (permalink) |
| 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 |
Show key headers only | View raw
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
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll 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