File: README

package info (click to toggle)
nut 2.8.1-5
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 18,284 kB
  • sloc: ansic: 108,785; sh: 9,370; cpp: 3,370; makefile: 2,842; python: 1,029; perl: 763; xml: 47
file content (50 lines) | stat: -rw-r--r-- 1,988 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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 data 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.

The same module should work for Python 2 and Python 3.

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/

For quick tests, just make sure its directory is exported in `PYTHONPATH`
environment variable.

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. A NUT data server should be running for the
test program to verify connection and protocol support.

For one practical example, you can research `tests/NIT/nit.sh` in NUT sources.

app
~~~

This directory contains the NUT-Monitor application, which uses the
PyNUT class, along with its resources.

To install it, you will either need to keep the files together, or to install:
- Depending on the Python version(s) your system has, put NUT-Monitor-py2gtk2
  or NUT-Monitor-py3qt5 to /usr/bin/, /usr/X11R6/bin/ or something like that
  (optionally making a simple NUT-Monitor symlink to the preferred version),
- ui/*.glade (for NUT-Monitor-py2gtk2) or ui/*.ui (for NUT-Monitor-py3qt5)
  to /usr/share/nut-monitor/,
- nut-monitor.png to something like /usr/share/pixmaps/
- finally, nut-monitor-py2gtk2.desktop and/or nut-monitor-py3qt5.desktop
  (optionally symlinked as nut-monitor.desktop) to /usr/share/applications/