Import

From GNU Radio
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Import additional python modules into the namespace.

Examples
  • from gnuradio.filter import firdes
  • import math,cmath
  • from math import pi

Parameters

Import
Takes the import string as input e.g. ("import math"). Python will attempt to import from whatever directory the current .grc file is in, the default system paths, and whatever is in $PYTHONPATH. You can not specify other paths in the Import parameter.

Example Flowgraph

In the following flowgraph, we used the Import block to import fftpack from scipy (the argument to the block is 'from scipy import fftpack'). fftpack is then used to set the variable taps as 'fftpack.ifftshift(fftpack.ifft([tap3, tap4, 1.0, tap1, tap2]))'

Import example.PNG

Source Files