http://gnuradio.org/trac/browser/gnuradio/trunk/gnuradio-core/src/lib/general/gr_feval.h
It defines a function 'eval' that can be called either from C++ or from
Python. In Python you can subclass this and override the eval function
with whatever you want. When the function is called from C++, control
flow passes to the Python interpreter to evaluate the function and return.
I haven't used it myself, but you can get a good feel for what is
possible by looking at the QA code for the block at:
http://gnuradio.org/trac/browser/gnuradio/trunk/gnuradio-core/src/python/gnuradio/gr/qa_feval.py
Johnathan Corgan, AE6HO
address@hidden