C
Clodoaldo Pinto Neto
Output from the shell:
[cpn@s0 teste]$ set | grep IFS
IFS=$' \t\n'
Output from subprocess.Popen():
Both outputs for comparison:
IFS=$' \t\n'
"IFS=' \t\n"
The subprocess.Popen() output is missing the $ and the last '
How to get the raw shell output from subprocess.Popen()?
Regards, Clodoaldo Pinto Neto
[cpn@s0 teste]$ set | grep IFS
IFS=$' \t\n'
Output from subprocess.Popen():
"IFS=' \t\n"import subprocess as sub
p = sub.Popen('set | grep IFS', shell=True, stdout=sub.PIPE)
p.stdout.readlines()[1]
Both outputs for comparison:
IFS=$' \t\n'
"IFS=' \t\n"
The subprocess.Popen() output is missing the $ and the last '
How to get the raw shell output from subprocess.Popen()?
Regards, Clodoaldo Pinto Neto