I want to create an error message in Python, i.e. the program should be interrupted and an (if possible coloured) error message should be printed. For instance:
If a == 0:
Error("a should be nonzero")
In Matlab, you can do this using the error
instruction. How can you do this in Python? I have found this page but I am not sure that is what I am looking for.