nut-debian/scripts/python/README

33 lines
1.3 KiB
Plaintext
Raw Normal View History

2010-03-26 01:20:59 +02:00
Python NUT Client files
-----------------------
This directory contains various NUT Client related Python scripts, written by
David Goncalves, and released under GPL v3.
* "module": this directory contains PyNUT.py, which is a Python abstraction
class to access NUT server(s). You can use it in Python programs to access NUT's
upsd data server in a simple way, without having to know the NUT protocol.
To import it on Python programs you have to use the following (case sensitive) :
'import PyNUT'
This module provides a 'PyNUTClient' class that can be used to connect and get
data from an upsd data server.
To install the PyNUT module on Debian/Ubuntu, copy it to:
/usr/share/python-support/python-pynut/
This directory also contains test_nutclient.py, which is a PyNUT test program.
For this to be fully functional, you will need to adapt the login, password and
upsname to fit your configuration.
* "app": this directory contains the NUT-Monitor application, that uses the
PyNUT class, along with its resources.
To install it, you will either need to keep the files together, or to install:
- NUT-Monitor to /usr/bin, /usr/X11R6/bin/ or something like that,
- gui.glade to /usr/share/nut-monitor/,
- nut-monitor.png to something like /usr/share/pixmaps/
- and nut-monitor.desktop to /usr/share/applications