Hello!

Faced the problem of using other people's compilers in Sharpe.

The task: to create an application that will accept the program (either with text or .exe) and drive it through the tests (Olympiad program). There was an idea to run the compiler of the desired PL using the Process class, to redirect input and output streams. I tried to do this with a python: the empty console opened and closed after some time - it does not work.

How can I solve the problem? There are other options for checking programs?

  • 2
    Your version sounds right. You need to compile the command line compiler, and run the resulting program. Just make sure to run from under a user with very limited access rights, in any case not from under the administrator. - VladD
  • It is not clear why you need redirection of input-output for the compiler. To get error messages? - VladD
  • Did a similar for Delphi. Understand the arguments that you pass to the compiler, as well as whether all the necessary components for compilation are installed. First make sure that the .bat file works, then call from the application. - Stanislav Pechezerov
  • The author is not talking about the I / O redirection of the compiler, but rather the redirection of the I / O of the compiled application (to check the correctness of its work, giving various test input data) Am I right? - Stanislav Pechezerov
  • Why opened and closed ... here you need to look at your code. And so, yes, the idea is correct. Perhaps you forgot to run your program after compiling? - Dmitry Polyanin

0