Description
Hello guys,
first thanks for the work !
I have the need to embed this package and particularly the snmp-record-command into a portable Windows executable so I have digged into py2exe and did some tests. I also noticed in the setup.py file some references of py2exe so I guess that what I want is doable.
I have managed to do some things with this py2exe setup.py:
from distutils.core import setup
import py2exe
setup(console=['snmp-record-command.py'])
and in snmp-record-command.py
import subprocess
import sys
sys.argv.pop(0)
return_code = subprocess.call(['snmpsim-record-commands'] + sys.argv)
print("Output of snmpsim-record-commands call() : ", return_code)
And this is working if I'm using the executable done
snmp-record-command.exe --agent-udpv4-endpoint=24.x.x.x --...
But my approach is not good because the subprocess.call(['snmpsim-record-commands'] + sys.argv) needs to have python + snmpsim already installed in the system which is not what I really wand because I need the executable to be standalone.
The problem is I don't understand how I could make. Can someone here points me to the good direction ?
Thanks