Seneca-144100/IPC-Workshops

[Suggestion] Pipe text to stdin instead of using pyautogui

Closed this issue · 1 comments

Instead of using pyautogui to type text quickly into the terminal window, you could just pipe the desired input text into stdin instead. I am not sure exactly what the grader does, as I am not a Seneca College student (I am a Zhejiang University student), but I'm sure that you could program the grader to pipe a text file to stdin and do something like cat input.txt | the-program-to-test. This way, the grader would be more automated, like DMOJ or the Canadian Computing Competition. This is just a suggestion. Thanks! :)

Hello @fffelix-jan, yes this is one way to manually test it, but we also grab all output to a text file using the script tool which does not capture piped stdin data. To take it to the next level and have the submitter itself automate inputs, would be an extra layer of io we don't want in the submitter application. There are additional variances you get too with different terminals being used that further complicate the process. For most of what we do, it is important to instill SOME arduous work on the student side to appreciate the benefits of coding something properly and thoroughly scrutinizing it PRIOR any attempts at submitting the work. This is a big part of programming - paying attention to the details and being able to notice the small things.