LEMS interpreter implemented in Python