On Mon, Apr 12, 2010 at 4:32 PM, Kurt Holmquist <[email protected]>wrote:
> > > Thank you for the response. > > I would like to use as GRC blocks the blocks that I create as described in > "How to Write a Signal Processing Block". This is a somewhat unconventional > situation in that I need a way for an "installed" application (i. e. grc) to > use a locally created component, sort of the opposite of the normal > situation. I think the XML file for the block should look something like: > > <?xml version="1.0"?> > <block> > <name>Square2</name> > <key>howto_square2_ff</key> > <category>HOWTO</category> > <import>import howto</import> > <make>howto.square2_ff()</make> > > <sink> > <name>in</name> > <type>float</type> > </sink> > > <source> > <name>out</name> > <type>float</type> > </source> > </block> > > When I copy this file into the directory where GRC stores the block XML > files (/usr/local/share/gnuradio/grc/blocks), GRC makes a "Square2" block > available for use. However, when I attempt to execute a flow graph that > includes this block, it fails as follows: > > Generating: "/home/kurt/gnuradio/grc/wav_file_to_speaker.py" > Executing: "/home/kurt/gnuradio/grc/wav_file_to_speaker.py" > > Traceback (most recent call last): > File "/home/kurt/gnuradio/grc/wav_file_to_speaker.py", line 17, in > <module> > import howto > ImportError: No module named howto > > ***************** > Where I need help is that I don't know how to set up python and/or > environment so that python can import these components. > ***************** > > Thanks again for any help you can provide. > Kurt, I think you want to write "*from gnuradio* import howto" Karthik
_______________________________________________ Discuss-gnuradio mailing list [email protected] http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
