I'm trying to do this tutorial on gnuradio page: https://wiki.gnuradio.org/index.php/TutorialPythonFunctions
It looks to be simple but I got the message "bad import syntax" when I try to import my function "testpy".
Has someone had the same problem or knows how to solve it?
This is unfortunately cryptic. What you have to write in the box is a Python import statement, not just the name of the module to import. That is, write
import testpy
instead of just testpy
.
You can also use from <module> import <name>, <name>
and all the other forms of the import
statement. (That's why it wants the statement and not just module names: so you can do either kind of import.)