Closed epogrebnyak closed 7 years ago
I'm expermenting with delegator.py on Windows, trying to capture process output (whatever was printed to console).
Apparently, I can capture output of a console command, like this:
import delegator c = delegator.run('dir c:') assert c.out.startswith(' Volume in drive C is')
However, when trying to capture output of python -V command, I get empty string while somehting like 'Python 3.6.0' is expected:
python -V
'Python 3.6.0'
d = delegator.run('python -V') # expected 'Python 3.6.0' assert d.out == ''
Python is printing that to standard error, i believe.
Indeed - this thing passes well:
d = delegator.run('python -V') assert d.err.startswith('Python')
Thank you!
I'm expermenting with delegator.py on Windows, trying to capture process output (whatever was printed to console).
Apparently, I can capture output of a console command, like this:
However, when trying to capture output of
python -V
command, I get empty string while somehting like'Python 3.6.0'
is expected: