PyGNUGK 3.50 review

Download
by rbytes.net on

License: GPL (GNU General Public License)
File size: 26K
Developer: Jerome Alet
0 stars award from rbytes.net

PyGNUGK is both a command line tool, a CGI script, and a set of Python classes available as a Python module, which can connect to GNU Gatekeeper's status port and return informations about what's there.

PyGNUGK project can currently report the list of registered endpoints and ongoing calls, but more features will be added in the future.

The report can currently be made either in plain text or in XML format.

Command line usage:

$ pygnugk [--xml] [gkhost] [gkport]

* --xml gives an XML report, otherwise plain text is assumed.

* gkhost defaults to 'localhost'.

* gkport defaults to '7000'.

CGI usage:

Copy the pygnugk command line tool from /usr/bin to /usr/lib/cgi-bin or create a symlink there.

From your web browser all of these are allowed :

http://yourserver/cgi-bin/pygnugk?host=gkhost&port=gkport

http://yourserver/cgi-bin/pygnugk?host=gkhost&port=gkport&format=xml

http://yourserver/cgi-bin/pygnugk

This one defaults to 'localhost', port '7000' and format 'plain'

Python module usage:

--- CUT ---
from gnugklib import gnugk

gk = gnugk.GNUGK(host="localhost", port=7000)

# Complete XML output (will grab endpoints and calls automatically) :
print gk.xml()

# Complete text output :
endpoints = gk.getEndPoints()
for endpoint in endpoints :
print endpoint

for call in gk.getCalls() :
print call

# outputs only first endpoint as XML (works with calls too)
if endpoints :
print endpoints[0].xml()
--- CUT ---

Installation:

Download pygnugk from :

http://cortex.unice.fr/~jerome/pygnugk/

and extract it :

$ tar -zxf pygnugk-x.yy.tar.gz

where x.yy is pygnugk's version number.

Run the installation script :

$ python setup.py install

This will usually install the pygnugk into /usr/bin and the library into /usr/lib/python2.?/site-packages/gnugk/

That's all !

NB : if you want to use XML output, you MUST download the jaxml Python module from http://www.librelogiciel.com/software/

If you use a Debian based distribution : apt-get install jaxml

Requirements:
GNU Gatekeeper
jaxml

What's New in This Release:
A Zope product is now included in the package.
This Zope product is a demo which currently exposes HTML and XML reports about the list of registered endpoints and ongoing calls.

PyGNUGK 3.50 search tags