I am new to mininet. I want to run the mininet commands to run from the python scripts like "nodes","dump". I can create the topology but cannot use these commands through my script. I am using Ubuntu 14.04.
import subprocess as sb
import os
print "Single Switch and 4 Hosts per switch topology"
print "Creation of topology"
os.system(" sudo mn --topo = single,4",shell=True)
os.system("nodes")
Error:
sh: 1: nodes: not found
32512
I do not want to create a topology through python script, I only want to use the mininet commands.