A TRex coding in Python