examples/flowmon/wifi-olsr-flowmon.py
changeset 5885 d9a32e315d1b
parent 5369 86beb5869f67
child 6627 fa5cf8df4d8f
     1.1 --- a/examples/flowmon/wifi-olsr-flowmon.py	Tue Oct 06 19:34:29 2009 -0700
     1.2 +++ b/examples/flowmon/wifi-olsr-flowmon.py	Tue Dec 29 11:15:51 2009 +0000
     1.3 @@ -104,7 +104,14 @@
     1.4      monitor.SetAttribute("PacketSizeBinWidth", ns3.DoubleValue(20))
     1.5  
     1.6      ns3.Simulator.Stop(ns3.Seconds(44.0))
     1.7 -    ns3.Simulator.Run()
     1.8 +
     1.9 +    try:
    1.10 +        import visualizer
    1.11 +    except ImportError:
    1.12 +        print "no visualizer"
    1.13 +        ns3.Simulator.Run()
    1.14 +    else:
    1.15 +        visualizer.start()
    1.16  
    1.17      def print_stats(os, st):
    1.18          print >> os, "  Tx Bytes: ", st.txBytes