Yes, as Mike indicated the whitelist is the $pg{modules} hash in global.conf.
A minimal first attempt at this would be to add just Inline::Python to that list, and then create a macro file that instantiates an Inline::Python object. Then add that to your list of macros in loadMacros at the beginning of a problem.
I haven't tested this, and I only looked briefly at Inline::Python, so it may not work and may even be way off base, but here would be my first attempt: Add Inline::Python to the list, and creat a new macro file in pg/macros called inline_python.pl containing this code.
sub _inline_python {};
sub python {
my $python_code = shift;
use Inline::Python => $python_code;
}
Put it in pg/macros, then in a problem do
loadMacros(
standard stuff,
"inline_python.pl"
);
Then to actually try it:
$python_code = <<'END_PYTHON';
your python code
END_PYTHON
Maybe your python code is
def add(x,y):
return x + y
def
subtract(x,y):
return x - y
Then you could see if you could use the subroutines in your problem:
$a = 1;
$b = 2;
$c = add($a,$b);
BEGIN_TEXT
c equals \{ ans_rule(4) \}
END_TEXT
ANS($c -> cmp());
Again, absolutely no idea if this is even close, but this is what I would try.