Alex Rosa
Alex Rosa

Reputation: 49

I got the message: "Bad import syntax:" when I try to import a python function inside my gnuradio flowgraph

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?

enter image description here

Upvotes: 1

Views: 308

Answers (1)

Kevin Reid
Kevin Reid

Reputation: 43773

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.)

Upvotes: 1

Related Questions