[Chicago] Testing Submitted Python Scripts

Walter Askew waltaskew at gmail.com
Tue Dec 7 14:09:41 CET 2010


> If needed I am up for helping you setup a VM that gets the .py file,
> runs it and drops output.txt somewhere.  If the VM stays alive for
> more than.. um.. 15 seconds, it gets killed.  Pretty sure this is
> overkill, and will make sure it is really needed if it comes to it.

I appreciate the offer.  I was thinking about hosting this on Google App Engine because it's free Python hosting.  I've never used it before, so I'm not sure how much control you are given over your little corner of Google.  Running off of my home computer is an option, too.

> OTOH, is this level of validation really needed?  I would think "click
> here to see the answer... did you get it right?"  would be good
> enough.    You may want to expand on your goal if not.


I've already got the forms and models put together for an 'enter an answer and see if you're right' thing.  That's fine if I have assignments like 'calculate the 100th prime number', but I'd like to be able to get a bit fancier.  

I want to be able to give assignments like 'Implement your own version of a Python dictionary.  Create a class named 'MyDict' with methods foo, bar and baz which do x, y and z'.  My tester program would essentially be a bunch of unit tests that exercise the class written by the students.


> I would look into running the code on the server.   the security
> problem has been solved. Here is one example:
> 
> http://codepad.org/UngHomhU
> 
> I am sure the build bot things are secure.  like Hudson, which I know
> nothing about.
> 
> If needed I am up for helping you setup a VM that gets the .py file,
> runs it and drops output.txt somewhere.  If the VM stays alive for
> more than.. um.. 15 seconds, it gets killed.  Pretty sure this is
> overkill, and will make sure it is really needed if it comes to it.
> 
> OTOH, is this level of validation really needed?  I would think "click
> here to see the answer... did you get it right?"  would be good
> enough.    You may want to expand on your goal if not.
> 
> -- 
> Carl K
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chicago/attachments/20101207/49971979/attachment.html>


More information about the Chicago mailing list