From 9aa67f3eaa2a87bf7896136656e0c37cb24e09c3 Mon Sep 17 00:00:00 2001 From: Mark Seaborn Date: Wed, 29 Apr 2009 21:52:44 +0100 Subject: [PATCH] Add Python extension module, wrapping imc_sendmsg() and imc_recvmsg() Change imcplugin demo to demonstrate running Python --- imcplugin/demo.py | 8 +++++ imcplugin/hello.html | 7 ++++- python_extension/python-nacl.c | 70 ++++++++++++++++++++++++++++++++++++++++++ python_extension/setup.py | 5 +++ 4 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 imcplugin/demo.py create mode 100644 python_extension/python-nacl.c create mode 100644 python_extension/setup.py diff --git a/imcplugin/demo.py b/imcplugin/demo.py new file mode 100644 index 00000000..1b865f67 --- /dev/null +++ b/imcplugin/demo.py @@ -0,0 +1,8 @@ + +print "Hello from Python" + +import nacl + +fd = 3 +nacl.imc_sendmsg(fd, "Python to Javascript") +print repr(nacl.imc_recvmsg(fd)) diff --git a/imcplugin/hello.html b/imcplugin/hello.html index 168be309..d528b0a6 100644 --- a/imcplugin/hello.html +++ b/imcplugin/hello.html @@ -5,7 +5,7 @@ Testing glibc...