source: python/trunk/PC/example_nt/example.c

Last change on this file was 2, checked in by Yuri Dario, 15 years ago

Initial import for vendor code.

  • Property svn:eol-style set to native
File size: 340 bytes
Line 
1#include "Python.h"
2
3static PyObject *
4ex_foo(PyObject *self, PyObject *args)
5{
6 printf("Hello, world\n");
7 Py_INCREF(Py_None);
8 return Py_None;
9}
10
11static PyMethodDef example_methods[] = {
12 {"foo", ex_foo, METH_VARARGS, "foo() doc string"},
13 {NULL, NULL}
14};
15
16PyMODINIT_FUNC
17initexample(void)
18{
19 Py_InitModule("example", example_methods);
20}
Note: See TracBrowser for help on using the repository browser.