Tag: Python

  • Mixing pysnmp and stdin

    Depending on the application, sometimes you want to have some socket operations going (such as loading a website) and have stdin being read. There are plenty of examples for this in python which usually boil down to making stdin behave like a socket and mixing it into the list of sockets select() cares about. A…

  • Rnms now using TurboGears 2.3.2

    While the website might of been idle there has been a great deal of work behind the scenes (unless you’re looking at github) updating and improving RoseNMS, the python based Network Management System. The code has had a great many changes including: Updating the TurboGears based code to 2.3.2 Simplifying the admin back to TG…

  • A python utf gotcha

    This one had me stumped for a while: # -*- coding: utf-7 -*- import datetime from sqlalchemy import ForeignKey, Column from sqlalchemy.types import Integer, Unicode, Boolean, DateTime default_due_date = datetime.datetime.now() + datetime.timedelta(days=30) Syntax error found on last line. Hmm, bring up a python interpreter and type the last line in with the imports. Works fine.…

  • Step or Sloping Graphs

    Even though the backend of Rosenberg NMS uses rrdtool RRD files, the front end graphs are created using jqPlot.  The idea is to have a set of templates for the different types of graphs and just apply them to the various data sets.  It makes things a lot simpler for new graphs because you just…

  • RNMS on GitHub

    Rosenberg NMS is now found on GitHub at https://github.com/csmall/rnms The code is still pre-alpha but it is now available to try out.  This means you can try out this new network management system. I have done this to hopefully shake out some of the bugs before the first release.  The program has minimal documentation but…

  • Pie Charts in TurboGears

    You might of looked at Ralph Bean’s tutorial on graphs and thought, that’s nice but I’d like something different.  The great thing about ToscaWidgets using the jqPlot library is that pretty much anything you can do in jqPlot, you can do in ToscaWidgets and by extension in TurboGears.  You want different graph types? jqPlot has…

  • python and rrdtool

    RRDTool is a neat utility for collecting and graphing statistics such as server loads or network traffic. There are two main modules for interfacing with RRDTool files within python; rrdpython and pyrrd. rrdpython is the basic bindings of the rrdtool library within python. The API is very familiar for people who program in C or…

  • Pre-selecting ToscaWidgets jqgrid values in TurboGears

    My Turbogears project has recently reached an important milestone; one of the back-end processes now runs pretty much continuously and the plugins it use (or at least the ones I can see) are also working.  That means I can turn to the front-end which displays the data the back-end collected. For some of the data…

  • jqGridWidget in Turbogears

        Turbogears 2 uses Toscawidgets 2 for a series of very clever widgets and base objects that you can use in your projects.  One I have been playing with is the jqGridWidget which uses jquery to display a grid. The idea with jquery is creating a grid or other object and then using javascript…

  • NTP control messages

    I have had an opportunity to rework some code to query NTP servers directly in python rather than running ntpq -pn and scraping the result.  The over-the-wire protocol format is reasonably straight forward and my little module is now passing all of its nosetests which is wonderful. While its only a single table, ntpq actually…