Of course, the title should be "py2exe", that's the only thing I couldn't edit :-)
Here is the full code:
from pysnmp.entity.rfc3413.oneliner import cmdgen
from pysnmp.entity import config
from Tkinter import *
def doCmd( key ):
errorIndication, errorStatus, errorIndex, varBinds = cmdgen.CommandGenerator().getCmd(
cmdgen.CommunityData('my-agent', 'public', 0),
cmdgen.UdpTransportTarget(("127.0.0.1", 161)),
key
)
print errorIndication
print errorStatus
for item in varBinds:
print item
doCmd( (1,3,6,1,4,1,557,1,1,10,3,1,1,305) )
Here is my compilation script:
from distutils.core import setup
import py2exe
setup(console=['snmpbad.py'])
Produces this output:
Traceback (most recent call last):
File "snmpbad.py", line 16, in
File "snmpbad.py", line 6, in doCmd
File "pysnmp\entity\rfc3413\oneliner\cmdgen.pyc", line 116, in __init__
File "pysnmp\entity\engine.pyc", line 16, in __init__
File "pysnmp\proto\rfc3412.pyc", line 16, in __init__
File "pysnmp\smi\builder.pyc", line 143, in __init__
File "pysnmp\smi\builder.pyc", line 35, in init
File "pysnmp\smi\builder.pyc", line 80, in _init
ImportError: No module named mibs.instances
Thanks for any assistance.
Kelly