filename = r"C:\Dokumente und Einstellungen\sschnei1\Desktop\a.mat"
print open(filename, "r").read().encode("hex")
The code above only work for text files. But I want to read out the hex-values of mat-files.
EDIT: my little hex-editor
from textwrap import fill
filename = r"C:\a.mat"
hexvalues = open(filename, "rb").read().encode("hex")
print fill(hexvalues,16)