> I think this is better: > > def hexsplit(arg): > lobyte = arg & 0x00FF > hibyte = (arg & 0xFF00) >> 8 > return chr(hibyte) + chr(lobyte) > > > Carsten. Sure is, didn't know python had shift operators.