I am working on something like compile , and i am trying to compile assembler and get the output information about it using subprocess
.
When I am using subprocess.call
every thing works fine like :
(I add some spam to it so it will output a error)
Version : Python3.5
In [12]: subprocess.call(['as','-32','test.s'])
test.s: Assembler messages:
test.s:3: Error: no such instruction: `zxvasdf'
Out[12]: 1
But when i use subprocess.getoutput
:
In [13]: subprocess.getoutput(['as','-32','test.s'])
It just freeze and do nothing .
How can i solve this problem ?
Thanks for any advice .