I am trying to use the netsnmp library to snmpset a attribute I get an error
robm@PC2303VM:~/code/python/snmp$ ./tester2.py
File "./tester2.py", line 5
ipaddr=netsnmp.Varbind('.1.3.6.1.2.1.69.1.3.1.0',172.168.100.2,'IPADDRESS')
^
SyntaxError: invalid syntax
now from the command line
snmpset -v2c -c private 10.1.1.8 .1.3.6.1.2.1.69.1.3.1.0 a 172.168.100.2
works just fine and quoting "172.168.100.2" gives a different error TypeError: expected string or Unicode object, NoneType found
#!/usr/bin/python
import netsnmp
ipaddr=netsnmp.Varbind('.1.3.6.1.2.1.69.1.3.1.0',172.168.100.2,'IPADDRESS')
netsnmp.snmpset(ipaddr, Version=2, DestHost="10.1.1.8", Community="private")
filename=netsnmp.Varbind('.1.3.6.1.2.1.69.1.3.2.0', './robertme/Q2Q_REL_7_2_2_2015_04_07_T1935.bin','STRING')
netsnmp.snmpset(filename, Version=2, DestHost='10.1.1.8', Community='private' )
any Ideas on how to format that correctly?