ftp.nice.ch/Attic/openStep/unix/developer/language/python/python.14.m.s.tgz#/python-14-OS-mach/PC/example_nt/example.c

This is example.c in view mode; [Download] [Up]

#include "Python.h"

static PyObject *
ex_foo(self, args)
	PyObject *self, *args;
{
	printf("Hello, world\n");
	Py_INCREF(Py_None);
	return Py_None;
}

static PyMethodDef example_methods[] = {
	{"foo", ex_foo, 1, "foo() doc string"},
	{NULL, NULL}
};

void
initexample()
{
	Py_InitModule("example", example_methods);
}

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.