Improved interface between python physics simulator and haskell code