Calling Alpino is done using Popen() followed by wait(). This doesn't check the return code of Alpino, so if something goes wrong it is silently ignored. Moreover, the wait() can deadlock if the output buffer is filled before the process quits, as the buffer is only read after the wait().
subprocess.check_output() corrects both wrongs by raising an error on return code != 0, and by collecting the output in a string
Calling Alpino is done using Popen() followed by wait(). This doesn't check the return code of Alpino, so if something goes wrong it is silently ignored. Moreover, the wait() can deadlock if the output buffer is filled before the process quits, as the buffer is only read after the wait().
subprocess.check_output() corrects both wrongs by raising an error on return code != 0, and by collecting the output in a string