检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
作 者:亓雪冬 李霞[2] QI Xuedong;LI Xia(Information Construction Department,China University of Petroleum(East China),Qingdao,Shandong 266580,China;College of Information and Control Engineering,China University of Petroleum(East China),Qingdao,Shandong 266580,China)
机构地区:[1]中国石油大学(华东)信息化建设处,山东青岛266580 [2]中国石油大学(华东)信息与控制工程学院,山东青岛266580
出 处:《微型电脑应用》2020年第6期90-92,共3页Microcomputer Applications
摘 要:针对Python程序自动评测过程中被测试程序输入输出流重定向问题进行研究。分析了基于操作系统输入输出重定向方法的缺点与不足,基于Python的动态性提出了Python伪装文件类对象输入输出重定向方法。设计并实现了满足标准输入输出流接口特性的伪装文件对象,在Python程序内部接管输入流和输出流,提高了重定向接口的灵活性,减少磁盘空间占用,严格限制输出流数据尺寸,保障评测过程稳定进行。该方法在实际应用中效果良好。The paper studies problems about the IO stream redirection in the automatic evaluation of python language programs.Thepaper analyzes and points out shortcomings of the OS-based IO redirection method,and proposes an IO redirection method using python masquerading file class object.The paper designsand implement masquerading file class objectwhich meets the characteristics of standard IO stream interfaces.This object takes over IO streams inside a python program,increases flexibility of the redirection interface,reduces disk space usage,limits the output stream data size strictly,ensures the stability of the automatic evaluationprocess.This method works well in practical applications.
关 键 词:PYTHON ONLINE JUDGE 自动测评 输入输出重定向
分 类 号:TP393[自动化与计算机技术—计算机应用技术]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:216.73.216.200