Mercurial > cpython-lru_cache-weakref
view PC/example_nt/example.c @ 69908:9688977ef567
test_ftplib.py: change client default timeout from 10 to 2. Hanging for 10 seconds is way too much when we expect a server response which never comes in.
| author | Giampaolo Rodola' <g.rodola@gmail.com> |
|---|---|
| date | Sat, 07 May 2011 17:08:34 +0200 |
| parents | cab14be0ada1 |
| children |
line wrap: on
line source
#include "Python.h" static PyObject * ex_foo(PyObject *self, PyObject *args) { printf("Hello, world\n"); Py_INCREF(Py_None); return Py_None; } static PyMethodDef example_methods[] = { {"foo", ex_foo, METH_VARARGS, "foo() doc string"}, {NULL, NULL} }; static struct PyModuleDef examplemodule = { PyModuleDef_HEAD_INIT, "example", "example module doc string", -1, example_methods, NULL, NULL, NULL, NULL }; PyMODINIT_FUNC PyInit_example(void) { return PyModule_Create(&examplemodule); }
