What is the best way to invoke the os.system command and assign it to a variable without printing the output ?
Example :
ifName = os.system('snmpwalk -v 1 -c <community> %s ifName.%s' % (switch,port))
Also with the output of the snmpwalk I will be wanting to only assign the last column. I know I could do with this with regex (re) but wondered what the most elegant way to achieve this was (i.e string formatting etc)...
Thanks,