summaryrefslogtreecommitdiff
path: root/doc/source/f2py/spam.pyf
diff options
context:
space:
mode:
authorPauli Virtanen <pav@iki.fi>2014-01-02 22:12:01 +0200
committerPauli Virtanen <pav@iki.fi>2014-01-02 22:19:47 +0200
commit75c2d2fe3cc9daa6589707fb6b8512ffa48fc365 (patch)
tree32e729ca94dd28e06c7c2e10fd250f2ce4b91a2a /doc/source/f2py/spam.pyf
parenta32807e61b25205cc08d552127234b56709c6242 (diff)
downloadnumpy-75c2d2fe3cc9daa6589707fb6b8512ffa48fc365.tar.gz
DOC: move f2py documentation under doc/ and link its user guide with Sphinx
Diffstat (limited to 'doc/source/f2py/spam.pyf')
-rw-r--r--doc/source/f2py/spam.pyf19
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/source/f2py/spam.pyf b/doc/source/f2py/spam.pyf
new file mode 100644
index 000000000..21ea18b77
--- /dev/null
+++ b/doc/source/f2py/spam.pyf
@@ -0,0 +1,19 @@
+! -*- f90 -*-
+python module spam
+ usercode '''
+ static char doc_spam_system[] = "Execute a shell command.";
+ static PyObject *spam_system(PyObject *self, PyObject *args)
+ {
+ char *command;
+ int sts;
+
+ if (!PyArg_ParseTuple(args, "s", &command))
+ return NULL;
+ sts = system(command);
+ return Py_BuildValue("i", sts);
+ }
+ '''
+ pymethoddef '''
+ {"system", spam_system, METH_VARARGS, doc_spam_system},
+ '''
+end python module spam