Bugzilla – Bug 1110
Sort alphabetically and display "Modules built" in columns
Last modified: 2011-04-26 17:30:25 EDT
As the number of modules in ns-3 will increase we could have Modules built: aodv applications bridge click config-store core csma dsdv emu energy flow-monitor internet lte mesh mobility mpi netanim network nix-vector-routing ns3tcp ns3wifi olsr openflow point-to-point propagation spectrum stats tap-bridge test tools topology-read uan virtual-net-device visualizer wifi wimax instead of Modules built: core, network, config-store, internet, propagation, point-to-point, csma, emu, bridge, tap-bridge, virtual-net-device, applications, nix-vector-routing, olsr, aodv, dsdv, click, openflow, mobility, wifi, netanim, stats, uan, spectrum, mesh, test, ns3tcp, ns3wifi, flow-monitor, wimax, lte, mpi, topology-read, energy, tools, visualizer I will leave it to the python experts to do this correctly. But this is how I did it modules_without_prefix =[mod[len('ns3-'):] for mod in env['NS3_ENABLED_MODULES']] modules_without_prefix = sorted(modules_without_prefix) print 'Modules built:' i = 1 for mod in modules_without_prefix: print mod.ljust(25), if i == 3: print i = 0 i = i+1
I made the list alphabetical but wrapped the lines at 70 characters rather than making columns: Modules built: aodv, applications, bridge, click, config-store, core, csma, dsdv, emu, energy, flow-monitor, internet, lte, mesh, mobility, mpi, netanim, network, nix-vector-routing, ns3tcp, ns3wifi, olsr, openflow, point-to-point, propagation, spectrum, stats, tap-bridge, test, tools, topology-read, uan, virtual-net-device, visualizer, wifi, wimax