Prepare PythonMode for distribution through normal channels.