Without checking in detail, it seems you are on the right track.
You just need to use unpack() on your guid to turn the string into fixnums or
whatever you want, like:

x = guid.unpack('c*')  
# assuming all is one byte data