mxcl/homebrew — pull request #24279 by megahall (2013-11-14 00:07:35+00:00)
Title: net-snmp.rb: add optional python bindings to the formula

Homebrew Maintainers,

This pull request adds what's needed to get the Python bindings for net-snmp to work on my system. This example code can be used to test it on another system to be sure I got it right:

#!/usr/bin/env python

import netsnmp

ip = "192.168.20.3"
vb = netsnmp.Varbind(".1.3.6.1.2.1.1.2.0")
response = netsnmp.snmpget(vb, DestHost=ip, RemotePort=161, Version=1, Community="public", Timeout=100000, Retries=1)
text = response[0]
print "text %s" % text
mhall@mhall-osx-01:~/src/mh-th/src/classifier$

Testing against an HP Printer here, I get this output:

text .1.3.6.1.4.1.11.2.3.9.1

It would be a huge help for my coworkers in my company if you could merge this or something similar into the official Homebrew.

Thanks,
Matthew Hall