I am introducing the mathematica Security (MSP module) to our system. The Document suggests use MSPToExpression as followed:
Needs["MSP`"]
SetSecurity[];
$$var = "5+7";
MSPToExpression[ $$var] (*the output is 12*)
But when I tried to adapt this function to $PrePrint with scripts:
$PrePrint = With[{$$var = ToString[#, InputForm]}, MSPToExpression[$$var]] &;
(*or*)
$PrePrint = With[{expr = #}, MSPToExpression[expr]] &;
(*or*)
$PrePrint = With[{$$var = #}, MSPToExpression[$$var]] &;
Input: 5+7
It can't recognize $$var as symbol, can anyone help me on this? Many thanks! :)

Module?Withinjects expressions to held slots. – Kuba Nov 27 '15 at 07:49