📌  相关文章
📜  sqlalchemy.exc.DBAPIError: (ibm_db_dbi.Error) ibm_db_dbi::Error: SystemError(&#39;<built-in function connect>返回 NULL 而不设置错误&#39;) - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:31.905000             🧑  作者: Mango

代码示例1
#include 

static void gen_nums() {
    int i;
    for(i = 0; i < 10; i++) {
        printf("Printed from C thread...\n");
        Sleep(1000);
    }
}
static PyMethodDef gen_numsmethods[] = {
    {"gen_nums", gen_nums, METH_VARARGS, "This is a threading test"},
    {NULL, NULL, 0, NULL}
};
static struct PyModuleDef threadmod = {
    PyModuleDef_HEAD_INIT,
    "threadrun",
    "This is a thread test module",
    -1,
    gen_numsmethods
};

PyMODINIT_FUNC PyInit_threadrun(void) {
    return PyModule_Create(&threadmod);
}