3 #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
5 #include <arrayobject.h>
13 #define TRY( E ) if ( !( E ) ) return NULL
16 static char doc_Pltk_init[] =
"Initialize the Pltk Tcl extension.";
24 static PyObject *pl_Pltk_init( PyObject *
PL_UNUSED(
self ), PyObject *args )
26 printf(
"in pl_Pltk_init()\n" );
29 TRY( PyArg_ParseTuple( args,
"l", &x ) );
33 printf(
"Something went wrong...\n" );
38 Tcl_Interp *
interp = (Tcl_Interp *) x;
40 printf(
"Tcl_Interp * = %ld \n", x );
44 printf(
"Initizlization of Pltk Tcl extension failed!\n" );
48 printf(
"plframe has been installed into the Tcl interpreter.\n" );
60 {
"Pltk_init", pl_Pltk_init, METH_VARARGS, doc_Pltk_init },
63 { NULL, NULL, 0, NULL }
74 m = Py_InitModule(
"plplot_widget", plplot_widget_methods );
75 d = PyModule_GetDict( m );
78 if ( PyErr_Occurred() )
79 Py_FatalError(
"plplot_widget module initialization failed" );