building an online judge to evaluate Python programs

Dave Angel davea at davea.name
Fri Sep 20 15:55:24 EDT 2013


On 20/9/2013 13:28, Jabba Laci wrote:

> Hi,
>
> In our school I have an introductory Python course. I have collected a
> large list of exercises for the students and I would like them to be
> able to test their solutions with an online judge (
> http://en.wikipedia.org/wiki/Online_judge ). At the moment I have a
> very simple web application that is similar to Project Euler: you
> provide the ID of the exercise and the output of the program, and it
> tells you if it's correct or not. However, it can only be used with
> programs that produce an output (usually a short string or a number).
>
> In the next step I would like to do the following. The user can upload
> his/her script, and the system tests it with various inputs and tells
> you if it's OK or not (like checkio.org for instance). How to get
> started with this?
>
> There are several questions:
> * What is someone sends an infinite loop? There should be a time limit.
> * What is someone sends a malicious code? The script should be run in a sandbox.
>

That last seems to me to be the biggie.  Several times in the past few
years, people in this mailing list have tried to build a safe sandbox.
And each one was a big failure, for a hacker of sufficient interest.
Some of them were spectacular failures.

If you have to be safe from your user, Python may be the wrong language
to give them.


-- 
DaveA




More information about the Python-list mailing list