Signalling between the python script and the flow graph

Hi,

I am using a python script that does this when I make a callback:

graph.lock()
disconnect(old graph)
connect(new graph)
graph.unlock()

time.sleep(some seconds)

graph.lock()
disconnect(new graph)
connect(old graph)
graph.unlock()

The new graph measures the average of a signal and sends it to a
signal
probe so I can get its value through signal_probe.level() and store it
in a
python variable.

I tried to change the time.sleep() by self.wait() and put a head() block
in
the new graph. According to the doxygen documentation, self.wait()
returns
if I have head blocks in the system. However, the script just stays in
the
self.wait() forever.

Probably there is another way to synchronize my flowgraph with the
python
script, so the script knows when it can go back to the old flowgraph.
Any
suggestion?

View this message in context:
http://old.nabble.com/Signalling-between-the-python-script-and-the-flow-graph-tp33681071p33681071.html
Sent from the GnuRadio mailing list archive at Nabble.com.