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