summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1c8f985)
raw | patch | inline | side by side (parent: 1c8f985)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Fri, 7 Jul 2006 22:37:20 +0000 (22:37 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Fri, 7 Jul 2006 22:37:20 +0000 (22:37 +0000) |
program/CONTRIBUTORS | patch | blob | history | |
program/bindings/python/rrdtoolmodule.c | patch | blob | history |
diff --git a/program/CONTRIBUTORS b/program/CONTRIBUTORS
index 8a47341e218ccc01819f7702f545d914e96eea74..aaf7718dcec9c881824ba617cbd0b8c727035338 100644 (file)
--- a/program/CONTRIBUTORS
+++ b/program/CONTRIBUTORS
Tom Crawley <Tom.Crawley with hi.riotinto.com.au> (GCC&HP configuration)
Travis Brown <tebrown with csh.rit.edu>
Tuc <ttsg with ttsg.com>
+Ulf Lilleengen <lulf with pvv.ntnu.no> Python binding for 'rrdtool first'
Ulrich Schilling <schilling with netz.uni-essen.de> AIX
Wim Heirman <wim.heirman elis.ugent.be> --units=si option
Wolfgang Schrimm <wschrimm with uni-hd.de> xport function
index f5a96d959b74572b301de4b243cc7b51a7023b6a..a0061040723af53f0af5157485f86759599f6d59 100644 (file)
return r;
}
+static char PyRRD_first__doc__[] =
+"first(filename): Return the timestamp of the first data sample in an RRD";
+
+static PyObject *
+PyRRD_first(PyObject UNUSED(*self), PyObject *args)
+{
+ PyObject *r;
+ int argc, ts;
+ char **argv;
+
+ if (create_args("first", args, &argc, &argv) < 0)
+ return NULL;
+
+ if ((ts = rrd_first(argc, argv)) == -1) {
+ PyErr_SetString(ErrorObject, rrd_get_error());
+ rrd_clear_error();
+ r = NULL;
+ } else
+ r = PyInt_FromLong((long)ts);
+
+ destroy_args(&argv);
+ return r;
+}
+
static char PyRRD_last__doc__[] =
"last(filename): Return the timestamp of the last data sample in an RRD";
meth("fetch", PyRRD_fetch, PyRRD_fetch__doc__),
meth("graph", PyRRD_graph, PyRRD_graph__doc__),
meth("tune", PyRRD_tune, PyRRD_tune__doc__),
+ meth("first", PyRRD_first, PyRRD_first__doc__),
meth("last", PyRRD_last, PyRRD_last__doc__),
meth("resize", PyRRD_resize, PyRRD_resize__doc__),
meth("info", PyRRD_info, PyRRD_info__doc__),