3 #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
5 #include <arrayobject.h>
16 #define TRY( E ) if ( !( E ) ) return NULL
19 static char doc_Pltk_init[] =
"Initialize the Pltk Tcl extension.";
27 static PyObject *pl_Pltk_init( PyObject *
PL_UNUSED(
self ), PyObject *args )
29 printf(
"in pl_Pltk_init()\n" );
32 TRY( PyArg_ParseTuple( args,
"l", &x ) );
36 printf(
"Something went wrong...\n" );
41 Tcl_Interp *
interp = (Tcl_Interp *) x;
43 printf(
"Tcl_Interp * = %ld \n", x );
47 printf(
"Initialization of Pltk Tcl extension failed!\n" );
51 printf(
"plframe has been installed into the Tcl interpreter.\n" );
63 {
"Pltk_init", pl_Pltk_init, METH_VARARGS, doc_Pltk_init },
66 { NULL, NULL, 0, NULL }
77 m = Py_InitModule(
"plplot_widget", plplot_widget_methods );
78 PyModule_GetDict( m );
81 if ( PyErr_Occurred() )
82 Py_FatalError(
"plplot_widget module initialization failed" );