Saving testbench data to file (solved)

This might be of some help : MyHDL cheat sheet
I started a tips and tricks but it is far from publishable.