add a python script for switching between text representations of matrices