Re: [Discuss-gnuradio] FW: new block with python

2016-01-28 Thread Marcus Müller
Hi Yan, pn = [] is an empty list. pn[i] += d tries to access an element of that list. I'm not quite sure you should be creating a pn = [] in every for loop iteration, neither. This looks like a Python programming issue to me. It's probably a good idea to practice a little bit on your python sk

[Discuss-gnuradio] FW: new block with python

2016-01-28 Thread Yan Huang
Hi all, I'm building a new block by python to do sequential energy detector. In my python block file, I want to divide my input into different part with same length(number). And add the samples in each part.The python file is attached. But when I use my block, it always print as follows: p