binär, hex, ascii

Info
In Python wird vieles per string weitergegeben. Um die Stringwerte zu verstehen,  hier ein kleiner Überblick:
–  „0x3“ entsprechen 3 Bytes (Ascii)
–  „\x3“ enrspricht einem Byte (Binärdatei)
– „\A3“ entspricht einem Byte (Binärdatei)

Binär einlesen
f = open( „../../edid.bin“ , „rb“ )
edid = f.read()                              ‚\xA1 \x10 \xFF 0\x32‘ == 4 Bytes

Wichtige Funktionen
Achtung !!                                
Wandeln Binärzahlen in ASCII !!
bin_zahl = bin(4)                       ‚0b100‘ == 5 Bytes
hex_zahl = hex(12)                  ‚0xc“ == 3 Bytes (Ascii)
edid = hex(3) + edid                „0x3 \xA1 \x10 “ == 3 + 2 = 5 Bytes