Framework for script input / output metafunctions (still need tp_call)