/* spammodule.c for use in Python
 *                         import spam
 *                         status = spam.system("ls -l")
 */

#include <python2.4/Python.h>

static PyObject * spam_system(PyObject *self, PyObject *args)
{
  const char *command;
  int sts;
  if(!PyArg_parse(args, "s", &command))
    return NULL;
  sts = system(command);
  return Py_BuildValue("i", sts);
} /* end spammodule.c */

