The script is not creating the graphics window using
viz.go(). Since no window is created, the script will immediately exit after reaching the end of the file. Try running the following code:
Code:
import viz
import viznet
viz.go()
dataNetwork = viz.addNetwork('LocalHost');
#viz.net.addPort(4960)
def onNetwork(e):
if isinstance(e,viz.RawNetworkEvent):
print e.raw_data
viz.callback(viz.NETWORK_EVENT,onNetwork)