Executing code in v.5.2 kernel from within v.7.01 session through MathLink

Here is an implementation based on Simon’s code. It still requires improvement. The one unclear thing to me is how to handle Messages generated in the slave (v.5.2) kernel. Here is my code: Clear[linkEvaluate] SetAttributes[linkEvaluate, HoldRest] linkEvaluate[link_LinkObject, expr_] := Catch[ Module[{out = {}, postScript = {}, packet, outputs = {}}, While[LinkReadyQhttps://stackoverflow.com/questions/4983301/executing-code-in-v-5-2-kernel-from-within-v-7-01-session-through-mathlink, Print[“From the buffer:\t”, LinkReadhttps://stackoverflow.com/questions/4983301/executing-code-in-v-5-2-kernel-from-within-v-7-01-session-through-mathlink]]; … Read more