I'm looking for SNMP support in Python. I have found pySNMP, but I'm
not sure whether this works under Windows as well. A few questions:
1) Where do I need to install the pySNMP files?
2) What do I have to do in order to be able to write somethin like:
"from pysnmp import session"
Thakns in advance for all input 2 8149
WIWA wrote: I'm looking for SNMP support in Python. I have found pySNMP, but I'm not sure whether this works under Windows as well.
Yes, it does.
A few questions:
1) Where do I need to install the pySNMP files?
Doesn't it install with distutils? If so "python setup.py --install"
or whatever it says in the README would work. Sorry, I haven't
installed it lately.
If it doesn't have instructions, put the files under the
c:/python/lib/site-packages directory.
2) What do I have to do in order to be able to write somethin like: "from pysnmp import session"
Install, then type "from pysnmp import session".... ;-)
Thakns in advance for all input
(If you're having troubles, please note versions and platform
next time, for Python, PySNMP, and Windows.)
-Peter
Hi Peter,
Thanks for this useful information. I tried this on my Windows2000
system and it seems to work. I used distutils and modified the PATH
entry. I'll check on my Windows XP machine and will let you know if I
found any discrepancy.
Thanks again for all your effort. I have another question, but will
put that in a separate message on this discussion forum. Any help is
welcome.
- Wim
Peter Hansen <pe***@engcorp. com> wrote in message news:<3F******* ********@engcor p.com>... WIWA wrote: I did two things, both unsuccessfull:
1) If I install the pySNMP modules under lib/site-packages and then type sth like: from pysnmp import session it gives the error message "ImportErro r: No module named pysnmp". The same happens if I unstall pySNMP directly under the lib directory. Installs in this context means 'copy paste' the *.py files of the pySNMP distribution.
I misled you the first time, but have since taken another look at the installation to see how it works. In order to import anything from a package (roughly, a set of .py files that includes an __init__.py file), you need to put those files in a directory which is named for the package (e.g. pysnmp in this case) _and_ which is available in sys.path. (Do "import sys" and "sys.path" to see the list. You probably have lib/site-packages in that list, so just put all the PySNMP files under it in a folder called pysnmp.)
- Do I need to explicitly mention in my script where pySNMP is installed?
Not if it's in a folder called pysnmp that is itself in one of the sys.path folders, or under the current folder.
2) I installed distutils 1.0.2 for Windows and it installed into the Python directory. So ar so good, I think...
Distutils is included in Python so you probably didn't need to do that, and maybe shouldn't have. I'm not sure whether that will have broken the standard distutils. It's repairable if it did. On my Python 2.2.1 setup here, the standard distutils is v1.0.3.
I go to DOS prompt and go to the directory where disutils is installed and type in python setup.py install, but DOS replies: 'Python is not recognized as an internal or external command, program or batchfile".
Now that's a different problem. You need python.exe to be findable from the DOS PATH. The simplest approach might be to check the FAQ entry at http://www.python.org/cgi-bin/faqw.p...=faq08.018.htp
As a test of the pysnmp installation, without having to change PATH at all, change to the Python directory ("cd \python" or whatever) and run the interactive interpreter ("python") and just type "import pysnmp" to see if it works.
System coordinates are Windows XP. Python version is 2.2.2 and pySNMP is version 3.0.0.
Should all be no problem, although I suspect instructions in that FAQ entry may be a little light on XP advice. Let us know if you see any area that could be improved so others can benefit from this exchange...
-Peter This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Matthew Bell |
last post by:
Hi,
I'm looking for a high-performance SNMP manager toolkit (SNMPv1 / v2,
GET / GETNEXT / GETBULK) I can use with Python on Windows2K/XP. I
wonder if anyone has got any suggestions? Commercial software is
fine, as it's for a specialised in-house application.
I've tried PySNMP which, while a fine piece of code (I've learnt a lot
looking through it!), it's fairly CPU intensive in my application.
I've also tried using UCDSNMP via...
|
by: Jeremy Sanders |
last post by:
Hi -
I'd like to write a program which basically does a few snmpgets. I haven't
been able to find a python package which gives you a nice high-level and
simple way of doing this (like PHP has). Everything appears to be
extremely low level. All I need is SNMPv1.
Does anyone know of a simple python package for doing this? I'd rather
have something written in pure python, so that it is easily cross-platform.
|
by: Kevin Ingram |
last post by:
Is it possible to connect to devices and read SNMP data with ASP? I did a
search and all I could find was utilities for sale to do it, wondered if it
can be done using straight ASP.
We are using InterDev 6, IIS5 on W2KServer.
Thanks!
|
by: py |
last post by:
>From what I have seen Python does not come with an snmp module built
in, can anyone suggest some other SNMP module (preferably one you have
used/experienced)..I have googled and seen yapsnmp and pysnmp (which
seem to be the two most active SNMP modules).
Thanks
|
by: Jean-Marc Blaise |
last post by:
Dear all,
I've been looking for some info on the snmp support provided by DB2 UDB
V8.1. Just 1 line, and 2 references in the index, when the V7.1
Troubleshooting guide had a complete paragraph.
Can I presume the snmp support is offered by V8, and if yes, on which
platforms exactly - is it supported on Linux/Intel and Z ?
Btw, with what pdf did this usefull troubleshooting guide merge in V8.1 ?
| |
by: vanisathish |
last post by:
Hi,
I need to develop a web-based NetworkManagement Software on windows
platform(planning to use ASP,HTML ). The Networking devices provide
support for SNMP.
Is there a way i can construct the SNMP PDUs from my ASP pages and get
response from the SNMP Agent ?
Can anyone suggest what would be the best approach for the WebNMS to
|
by: Schroeder, AJ |
last post by:
Hello group,
I performed binary installs of Net-SNMP and PHP 4.4.4 on my Windows XP
laptop so that I can do some offline development/testing away from my Linux
server. Anyway, I attempted to do some SNMPv3 gets/sets and I am greeted
with "Encryption support not enabled" whenever I try and do any SNMPv3 call.
I thought it was Net-SNMP, so I did some googling and found that you need to
compile Net-SNMP from scrtach with OpenSSL support...
|
by: KDawg44 |
last post by:
Hi,
I am very new to Python and really just began studying and using it.
I read that it was relatively easy to interact with Windows machines
with Python and I am desperately looking for something to replace
VBScript (not a big fan).
I am currently deploying a Gentoo Linux SNMP server running Cacti in
my network and would like my XP machines to report traps to this box.
The SNMP service is not running by default on the machines in the
|
by: Dirk Van de moortel |
last post by:
{
OOPS, posted this to moderated group perl.cpan.discuss as
well, so it can take a while to get through, if it gets through at all
Otherwise sorry for duplicate posting
}
We need to set up a server 2003 (or a win XP system) to accept
and act upon traps sent out from a storage system. Responding
to various error conditions, this system can be fully configured to
send traps.
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |