novice20 17 Junior Poster

below is how an snmp get is issued using pysnmp

errorIndication,errorStatus,errorIndex,varBinds = cmdgen.CommandGenerator().getCmd( cmdgen.CommunityData('xxxx', 'xxxx', 1), cmdgen.UdpTransportTarget(('192.168.5.157', 161)), (1,3,6,1,4,1,18489,1,2,1,4,5,1,0))

In the OID part, the integer in bold keeps changing from 1 to 38.
I need to put the above in a loop, instead of issuing 38 seperate gets.

how can this single integer within OID can be looped using a for loop in python?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.