luogu-dev / cyaron

CYaRon: Yet Another Random Olympic-iNformatics test data generator
GNU Lesser General Public License v3.0
1.35k stars 168 forks source link

cyaron能生成Python程序的数据吗 #89

Closed ciao1 closed 3 years ago

ciao1 commented 3 years ago

如题,看介绍是对exe文件进行数据生成,能否为.py程序生成数据?

kkksc03 commented 3 years ago

Yes, as long as you run a command using standard input/output.------------------ 原始邮件 ------------------ 发件人: "IWantYou"<notifications@github.com> 发送时间: 2021年3月9日(星期二) 下午2:49 收件人: "luogu-dev/cyaron"<cyaron@noreply.github.com>; 抄送: "Subscribed"<subscribed@noreply.github.com>; 主题: [luogu-dev/cyaron] cyaron能生成Python程序的数据吗 (#89)

ciao1 commented 3 years ago

为什么我运行后out文件中没有结果 from cyaron import * for i in range(1,6): test_data=IO(file_prefix="ab",data_id=i) a=randint(1,100) b=randint(1,100) test_data.input_writeln(a) test_data.input_writeln(b) test_data.output_gen("D:\ab.py")

thallium commented 3 years ago

因为python文件不能直接运行

ciao1 commented 3 years ago

看来还是需要exe才能生成。应该是不支持解释性语言

lin-toto commented 3 years ago

可以,不是那么运行的

ciao1 commented 3 years ago

可以,不是那么运行的

那如何运行呢?

weilycoder commented 4 days ago

test_data.output_gen("python D:\ab.py")