Port of Simtrace to Python