#include #include #include #include #include "websocket_test.h" #include "xml_test.h" #include void testpy() { Py_Initialize(); static struct PyModuleDef SWIG_module = { PyModuleDef_HEAD_INIT, (char *) "_game", NULL, -1, nullptr, NULL, NULL, NULL, NULL }; auto m = PyModule_Create(&SWIG_module); PyRun_SimpleString("print('hello')"); } int main(int argc, char* argv[]) { testpy(); #if 0 a8::PyEngine pyengine; pyengine.Init(); pyengine.LoadModule("test"); a8::XObject xobj; a8::StringList sl; sl.LoadFromFile("test.json"); xobj.ReadFromJsonString(sl.Text()); std::string data; xobj.ToJsonStr(data); printf("%s\r\n", data.c_str()); WebSocket_Test::Instance()->Init(); XMLTest::Instance()->Init(); #endif while (true) { printf("....\n"); ::sleep(1); } return 0; }