Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #6436
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!feeder.erje.net!news2.arglkargh.de!news.musoftware.de!wum.musoftware.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | Thorsten Kampe <thorsten@thorstenkampe.de> |
| Newsgroups | comp.lang.python |
| Subject | Re: changing current dir and executing a shell script |
| Date | Sat, 28 May 2011 00:18:53 +0200 |
| Lines | 13 |
| Message-ID | <MPG.284a41bcc404f1f7989819@news.individual.de> (permalink) |
| References | <c49d698b-183f-46a2-8367-c7db0761ba19@glegroupsg2000goo.googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset="us-ascii" |
| Content-Transfer-Encoding | 7bit |
| X-Trace | individual.net YKpwrqXWU3+PKH488p5bCAjQwlZRvASo4EPPtjCLIZ4cx0CL0= |
| Cancel-Lock | sha1:Fq7tbDw04Ior0gHjMJiCMJKY/YI= |
| User-Agent | MicroPlanet-Gravity/3.0.4 |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:6436 |
Show key headers only | View raw
* suresh (Fri, 27 May 2011 14:25:52 -0700 (PDT))
> 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')
os.chdir?
Back to comp.lang.python | Previous | Next — Previous in thread | 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