Try using the following code to see what the contents of the
raw_data attribute is:
Code:
def onNetwork(e):
if isinstance(e,viz.RawNetworkEvent):
print repr(e.raw_data)
Keep in mind that the raw data can contain trailing NULL (\x00) byte values, so you might need to account for this if you are expecting to receive a string.