summaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorValery Febvre <vfebvre at easter-eggs.com>2004-05-06 17:02:18 +0000
committerValery Febvre <vfebvre at easter-eggs.com>2004-05-06 17:02:18 +0000
commitbc26c8f129dd0b64f067624dea97259a664bbef1 (patch)
treef35e72ec180cbde76c9d162c98154e0b86444cbd /python
parent60cffeeeb185ec2b9c70d8018b2cc61f11e2f945 (diff)
downloadlasso-bc26c8f129dd0b64f067624dea97259a664bbef1.tar.gz
lasso-bc26c8f129dd0b64f067624dea97259a664bbef1.tar.xz
lasso-bc26c8f129dd0b64f067624dea97259a664bbef1.zip
*** empty log message ***
Diffstat (limited to 'python')
-rw-r--r--python/lasso.py3
-rw-r--r--python/lassomod.c1
-rwxr-xr-xpython/setup.py8
-rw-r--r--python/xml/py_xml.c16
-rw-r--r--python/xml/py_xml.h1
5 files changed, 25 insertions, 4 deletions
diff --git a/python/lasso.py b/python/lasso.py
index bf498859..eea0a596 100644
--- a/python/lasso.py
+++ b/python/lasso.py
@@ -72,6 +72,9 @@ class Node:
def get_child(self, name):
return Node(_obj=lassomod.node_get_child(self, name))
+ def get_content(self):
+ return lassomod.node_get_content(self)
+
def url_encode(self, sign_method, private_key_file):
return lassomod.node_url_encode(self, sign_method, private_key_file)
diff --git a/python/lassomod.c b/python/lassomod.c
index b780b0ec..d3b7d58c 100644
--- a/python/lassomod.c
+++ b/python/lassomod.c
@@ -64,6 +64,7 @@ static PyMethodDef lasso_methods[] = {
{"node_dump", node_dump, METH_VARARGS},
{"node_get_attr_value", node_get_attr_value, METH_VARARGS},
{"node_get_child", node_get_child, METH_VARARGS},
+ {"node_get_content", node_get_content, METH_VARARGS},
{"node_unref", node_unref, METH_VARARGS},
{"node_url_encode", node_url_encode, METH_VARARGS},
{"node_soap_envelop", node_soap_envelop, METH_VARARGS},
diff --git a/python/setup.py b/python/setup.py
index a94d5190..49aadb6e 100755
--- a/python/setup.py
+++ b/python/setup.py
@@ -180,10 +180,10 @@ extract_cflags(xmlsec1_cflags)
extract_libs(xmlsec1_libs)
# FIXME : cflags & libs for lasso
-#include_dirs.append('..')
-#library_dirs.append('../lasso/.libs')
-include_dirs.append('/usr/local/include')
-library_dirs.append('/usr/local/lib')
+include_dirs.append('..')
+library_dirs.append('../lasso/.libs')
+#include_dirs.append('/usr/local/include')
+#library_dirs.append('/usr/local/lib')
libraries.append('lasso')
em = Extension("lassomod",
diff --git a/python/xml/py_xml.c b/python/xml/py_xml.c
index 76384319..d13c835e 100644
--- a/python/xml/py_xml.c
+++ b/python/xml/py_xml.c
@@ -95,6 +95,22 @@ PyObject *node_get_child(PyObject *self, PyObject *args) {
return (LassoNode_wrap(ret));
}
+PyObject *node_get_content(PyObject *self, PyObject *args) {
+ PyObject *node_obj;
+ xmlChar *ret;
+
+ if (CheckArgs(args, "O:node_get_content")) {
+ if(!PyArg_ParseTuple(args, (char *) "O:node_get_content",
+ &node_obj))
+ return NULL;
+ }
+ else return NULL;
+
+ ret = lasso_node_get_content(LassoNode_get(node_obj));
+
+ return (xmlCharPtr_wrap(ret));
+}
+
PyObject *node_unref(PyObject *self, PyObject *args) {
PyObject *node_obj;
diff --git a/python/xml/py_xml.h b/python/xml/py_xml.h
index 52723113..afc4200f 100644
--- a/python/xml/py_xml.h
+++ b/python/xml/py_xml.h
@@ -39,6 +39,7 @@ PyObject *LassoNode_wrap(LassoNode *node);
PyObject *node_dump(PyObject *self, PyObject *args);
PyObject *node_get_attr_value(PyObject *self, PyObject *args);
PyObject *node_get_child(PyObject *self, PyObject *args);
+PyObject *node_get_content(PyObject *self, PyObject *args);
PyObject *node_unref(PyObject *self, PyObject *args);
PyObject *node_url_encode(PyObject *self, PyObject *args);
PyObject *node_soap_envelop(PyObject *self, PyObject *args);