I know that this is probably an easy question, but how do I remove the quotes produced by this code:
import netsnmp
site = "office"
session = netsnmp.Session( DestHost='10.0.0.250', Version=2, Community='public' )
mod = netsnmp.VarList( netsnmp.Varbind('HOST-RESOURCES-MIB::hrDeviceDescr.1') )
model = session.get(mod)
print model
This produces this output:
('HP Color LaserJet CM4540 MFP',)
How do I get rid of those parentheses and quote marks?
Try:
print model[0]
You're trying to the print the tuple representation.