Re: How to import custom script to GRC?

2020-11-22 Thread Fabian Schwartau
Thanks for the info.
I already stumbled accross this block, but a quick try did not worked as
expected. Classical case of RTFM ;) You have to call the functions you
define in there with idOfPythonModuleBlock.myFunction():
https://wiki.gnuradio.org/index.php/Python_Module
Thanks a lot!

Am 21.11.20 um 19:40 schrieb Marcus D. Leech:
> On 11/21/2020 09:26 AM, Fabian Schwartau wrote:
>> Hi everyone,
>> I would like to built some flow graphs with GRC, but I need to write a
>> few custom python functions which I want to use in the flow graph. For
>> example I need to generate some filter coefficient and things like that.
>> I thought I just create a python script in the same folder, define some
>> functions, import the script with the Import block and I am good to go.
>> However, the Import block complains that the import failed and I cannot
>> start the flow graph.
>> What am I missing? What the the typical workflow in such case?
>>
>> Best regards,
>> Fabian
>>
>>
> The "Python Module" block takes care of that quite handily.
> 
> 
> 




Re: How to import custom script to GRC?

2020-11-21 Thread Marcus D. Leech

On 11/21/2020 09:26 AM, Fabian Schwartau wrote:

Hi everyone,
I would like to built some flow graphs with GRC, but I need to write a
few custom python functions which I want to use in the flow graph. For
example I need to generate some filter coefficient and things like that.
I thought I just create a python script in the same folder, define some
functions, import the script with the Import block and I am good to go.
However, the Import block complains that the import failed and I cannot
start the flow graph.
What am I missing? What the the typical workflow in such case?

Best regards,
Fabian



The "Python Module" block takes care of that quite handily.





How to import custom script to GRC?

2020-11-21 Thread Fabian Schwartau
Hi everyone,
I would like to built some flow graphs with GRC, but I need to write a
few custom python functions which I want to use in the flow graph. For
example I need to generate some filter coefficient and things like that.
I thought I just create a python script in the same folder, define some
functions, import the script with the Import block and I am good to go.
However, the Import block complains that the import failed and I cannot
start the flow graph.
What am I missing? What the the typical workflow in such case?

Best regards,
Fabian