I have a modified spec file. I know you will want to change it into a hook 
file. I am using pysnmp version 4.2.5
All I changed was the hidden imports section.

The program I used was out of their tutorial section.







-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/groups/opt_out.

Attachment: app.spec
Description: Binary data

#!/usr/bin/python
from pysnmp.entity.rfc3413.oneliner import cmdgen
from pysnmp.smi import builder
#from pysnmp import debug

import sys
import os

#debug.setLogger(debug.Debug('mibbuild'))
#try:
#    print sys._MEIPASS
#    print os.listdir(sys._MEIPASS + '/pysnmp_mibs/mibs' )
#except:
#    pass

cmdGen = cmdgen.CommandGenerator()


errorIndication, errorStatus, errorIndex, varBinds = cmdGen.getCmd(
    cmdgen.CommunityData('public'),
    cmdgen.UdpTransportTarget(('localhost', 161)),
    cmdgen.MibVariable('SNMPv2-MIB', 'sysDescr', 0),
    lookupNames=True, lookupValues=True
)

# Check for errors and print out results
if errorIndication:
    print(errorIndication)
elif errorStatus:
    print(errorStatus)
else:
    for name, val in varBinds:
        print('%s = %s' % (name.prettyPrint(), val.prettyPrint()))

Reply via email to