Message9257
Below is the output you had asked,
>>> import subprocess as sub
>>> p = sub.Popen('ls',stdout=sub.PIPE,stderr=sub.PIPE)
>>> output, errors = p.communicate()
>>> print output
>>> import subprocess as sub
>>> p = sub.Popen('ls',stdout=sub.PIPE,stderr=sub.PIPE)
>>> output, errors = p.communicate()
>>> print errors
>>> import subprocess
>>> status = subprocess.call("ls"+ "", shell=True)
>>> print status
255
in the first two cases, output and errors both are coming empty where as subprocess.call returns 255 again. |
|
Date |
User |
Action |
Args |
2014-12-19 03:26:22 | shishir | set | messageid: <1418959582.19.0.376904211866.issue2238@psf.upfronthosting.co.za> |
2014-12-19 03:26:22 | shishir | set | recipients:
+ shishir, zyasoft |
2014-12-19 03:26:22 | shishir | link | issue2238 messages |
2014-12-19 03:26:21 | shishir | create | |
|