I'd like to set the recursion limit from the python command line (as part of a pipeline for grading scripts that are written by students). Let's ignore the fact that students shouldn't be using very deep recursion.
Basically, I want something like
python studentcode.py --firstrunmycode "sys.setrecursionlimit(5000)"
...so that the interpreter's recursion limit is increased to 5000 before running the student's python script.
One solution is to first prepend the code to set the recursion limit at the start of the student's file, but there must be a more elegant way to proceed.