'subprocess.check_output' extra new line?
sbremal at hotmail.com
sbremal at hotmail.com
Fri Jan 4 10:50:58 EST 2013
Hi
I wonder if the additional new line charachter at the end of the standard output capture is on purpose with 'subprocess.check_output'?
>>> subprocess.check_output([ 'cygpath', 'C:\\' ])
'/cygdrive/c\n'
If I do the same from the shell there is no extra new line (which is correct I believe):
$ x=$(cygpath C:\\); echo "_${x}_"
_/cygdrive/c_
Surely I have a workaround. I was more interested whether it was a design flaw.
Cheers
B.
More information about the Python-list
mailing list