Hier_block

Hi

Im trying to implement a hier_block, but when do a “sudo make install” I
get
the following error:
"
Byte-compiling python modules…
qam_corr_demod.py File
“/usr/local/lib/python2.4/site-packages/python/qam_corr_demod.py”, line
28
gr.hier_block.init(self, fg, self.qam_corr , self.qam_corr)
^
SyntaxError: invalid syntax
"

does anyone know why this happend?

best regards
erlend

On Sat, Nov 11, 2006 at 12:43:01PM +0100, Erlend Barstad Strand wrote:

SyntaxError: invalid syntax
"

does anyone know why this happend?

best regards
erlend

Erlend, that’s not much of a hint. It is a file that you wrote, right?

Eric

Sorry, I realise I was a bit short…

The file I’m trying to compile is qam_corr_demod.py.

I have file directory similar to gr-how-to-square and the makefiles are
mostly copies of the makfiles in this example, with modifications.

I have made a block, qam.demodulate_cf, which I would like to use
together
with two signal sources in qam_corr_demod.py. The block itself (
qam.demodulate_cf) works fine, but im not able to compile the
qam_corr_demod.py and make it available in my qam module. What are the
changes I should do to the makefiles to make this work?

I do not get the first error I reported anymore.

thanks for any help
erlend

2006/11/11, Eric B. [email protected]:

On Sun, Nov 12, 2006 at 11:52:03AM +0100, Erlend Barstad Strand wrote:

Sorry, I realise I was a bit short…

The file I’m trying to compile is qam_corr_demod.py.

  fg.connect(self.carrier_inphase, (self.qam_corr,1))
  fg.connect((self.carrier_quadrature, (self.qam_corr,2))
               ^
               +----- Extra paren here
    gr.hier_block.__init__(self, fg, self.qam_corr , self.kludge_out)

I suggest using an editor that does automatic parenthesis balancing
and automatic indentation for Python. I’m a fan of xemacs, but there
are others. They keep you from spending hours looking for stuff like
this :wink:

Eric

Thanks for the hint on xemacs…

However I still have problems compiling it… most likely because I do
not
know how to use the makefiles properly… Now I get an error when
trying to
use my qam_corr_demod:
"
self.qam_demod = qam.qam_corr_demod(self, Fs, Fc, amplitude, decimation)
AttributeError: ‘module’ object has no attribute ‘qam_corr_demod’

"

My guess is that it is due to my makefile in the python directory…
the
file is included as an attachment:

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs