GRC Importing modules from local directory

Using GRC “import block”, i want to import some custom modules from a
local
directory
(same directory contains grc files and other files that needs to be
imported), but it is giving error.
As i understood, GRC doesn’t recognizes the directory in which we save
‘*.grc’ as its working directory
How can i import these modules?

Regards
Adeel

On 10/05/2011 11:50 PM, adeel anwar wrote:

As with all things python. Put the modules in your PYTHONPATH. If you
can import the module from a python shell, it will work in GRC.

-josh

While writing python programs we can import any module from same
directory
directly (no need to put it in python path)
e.g. in “gnuradio-examples>digital>benchmark_loopback.py” 2 modules
transmit_path and receive_path are imported.
Even if we copy this “digital” to some other place e.g. desktop, these
files
will still be imported without error.
Can’t we do same in GRC?
As u told by putting these modules in python path we can import in GRC
but
if i write an example and wants to distribute,
it should be able to run in any directory as it is without the
requirement
to put in python path (e.g. digital mentioned above)

Adeel

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