Message88442
| Author |
yonas |
| Recipients |
amaury.forgeotdarc, yonas |
| Date |
2009年05月27日.20:52:46 |
| SpamBayes Score |
3.6876552e-06 |
| Marked as misclassified |
No |
| Message-id |
<1243457568.09.0.992903909872.issue6122@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
Here's another test, taken from the docs:
http://docs.python.org/library/subprocess.html#subprocess-replacements:
This is slightly better than Popen because the program executes and
shows output, but worse than os.system(), because it still shows the error:
--------------------------
try:
retcode = call("echo" + " \"hello world\"", shell=True)
if retcode < 0:
print >>sys.stderr, "Child was terminated by signal",
-retcode
print >>sys.stderr, "Child was terminated by signal",
-retcode
else:
print >>sys.stderr, "Child returned", retcode
except OSError, e:
print >>sys.stderr, "Execution failed:", e
-----------------
hello world
Execution failed: [Errno 10] No child processes |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2009年05月27日 20:52:48 | yonas | set | recipients:
+ yonas, amaury.forgeotdarc |
| 2009年05月27日 20:52:48 | yonas | set | messageid: <1243457568.09.0.992903909872.issue6122@psf.upfronthosting.co.za> |
| 2009年05月27日 20:52:46 | yonas | link | issue6122 messages |
| 2009年05月27日 20:52:46 | yonas | create |
|