five_dollar_shake
five_dollar_shake

Reputation: 378

Python built-ins not recognized

I'm using the Redhawk IDE. I noticed when I write Python in the IDE, none of the built-ins (len(),str(),True,False,etc...) are recognized, which gives errors and causes them to be underlined in red.

However, if I install to Target SDR anyway, the component seems to function normally.

How can I get Python in the IDE to recognize built-ins so I can get rid of the faulty errors?

Upvotes: 1

Views: 190

Answers (2)

five_dollar_shake
five_dollar_shake

Reputation: 378

Erik's answer led to the solution. What worked for me is:

  1. Window -> Preferences
  2. PyDev -> Interpreter - Python
  3. Remove Python interpreter
  4. Click "New..."
  5. Enter interpreter name ("Python" works) and select path to interpreter
  6. By default, the top option was selected. Make sure it isn't: add org.python.pydev to the system path
  7. Click "OK"
  8. Click "Apply"

You should now see that the built-in functions are recognized by Python.

Upvotes: 2

HavelTheGreat
HavelTheGreat

Reputation: 3386

If you can't run any Python in the IDE, there are two possible explanations:

1. You have an incorrect Python path being set for you by Eclipse, and you will have to adjust it manually. Using this article from Opal, you can easily check that Python is in fact correctly linking to your IDE, and if it isn't you can point it in the right direction.

2. You have a broken installation of Redhawk. Sounds dubious but you can always try a fresh install.

Upvotes: 1

Related Questions