accessing BLT vectors from C

genehilton at genehilton at
Fri Apr 21 15:11:47 EDT 2000

Has anyone out there written anything that will enable me to access
the BLT C api.  I am using BLT as a part of a data acquisition
system.  It works great, but filling the vectors is really slow in
python.  I wrote a python module in C to use the Blt c api, but it can't
find the vectors I created with Pmw.Blt.Vector().  I can access (in the
c module) vectors that I create in the c-module.  This must be some sort
of TCL thing I don't understand.  Here is a snippet from the C module

        if (!PyArg_ParseTuple(args, "OO",&master,&bltobj)) return NULL;

/* get the name of the vector - PMW stores it as the repr. */
        if (!bltobjname) return NULL;
        if (!bltname) return NULL;
/* get the interpreter from an argument (for now) */
         interp=((TkappObject *)master)->interp;

/* this doesn't work (returns a 0) */
/* this works (returns a 1) */

I call it with the following python code

import Tkinter
import Pmw
import mymod

I get an output like
0     (couldn't find it - v created in python)
0     (created ok in c)
1     (found the one created in c)

Any pointers would be real helpful

Gene Hilton
hilton at

Sent via
Before you buy.

More information about the Python-list mailing list