timec.c
来自「python改写的<<C语言百例>>! 很经典的程序开发」· C语言 代码 · 共 23 行
C
23 行
#include <Python.h>;
#include "time_test.h"
///timeC.c
/// the wrapper for time_test.c
static PyObject* timeC_time()
{
time_test();
return Py_None;
}
static PyMethodDef timeCMethods[] = {
{"time", timeC_time, METH_VARARGS,
"Execute a shell command."},
{NULL, NULL, 0, NULL} /* Sentinel, end of list of functions*/
};
PyMODINIT_FUNC inittimeC()
{
Py_InitModule("timeC", timeCMethods);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?