Trouble Shooting

时间:2014-06-07 07:11:28   收藏:0   阅读:253

情况是这样的,我在写一个类似于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

 

Trouble Shooting,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!