Fix for issue 3192

replace exec by eval to ensure the c variable is defined for all relevant python versions