If I run a python-code (in my python-program, external grader) by command as:
“p = subprocess.Popen([“py.test”, “{0} test FILE_GENERATEED_WITH_CODE_TO_RUN_IN_SANDBOX.py”.format(problem_name[‘problem_name’]), program_name, “-v”], stdout=subprocess.PIPE, stderr=subprocess.PIPE)”
, than a code will be runned out of sandbox, just as in command line: “py.test FILE_GENERATEED_WITH_CODE_TO_RUN_IN_SANDBOX.py”.
But I should and want to run code (which is got from “Problem”-element, code is wrote by student of course) in sandbox, codejail sandbox. How to do it?