Trouble Shooting

情况是这样的,我在写一个类似于Online-Judge的系统,用python很容易实现,编译源程序,运行程序,最后比较程序输出与标准输出得出成绩。现在有个问题,万一程序运行时崩溃,比如出现除0异常,assert失败等等,则在windows下会出现恼人的crash window。我想要避免它,因为我一次要执行很多个程序,如果每个程序都出现一个窗口,这意味着必须手动关闭窗口,很麻烦。所以找了好久,终于找到解决方法,哈哈!

Python pipopen to execute an external program but if it is crashed, there will be an crash window, it so boring, I want to avoid this window when program crashing!

参考: http://stackoverflow.com/questions/5069224/handling-subprocess-crash-in-windows

原文地址:https://www.cnblogs.com/xianzhon/p/3770690.html