views:

50

answers:

2

I'm having trouble setting up SpringPython with PyDev and Jython

I've installed Spring python by:

jython setup.py install

and the setup installed the library to my jython installation successfully.

See!: alt text

In my PyDev project i've selected the jython interpreter and have c:\jython2.5.1\Lib\site-packages in my Library paths: alt text

My eclipse environment fails to resolve the new classes: alt text

What else do I need to do to install this baby?

Perhaps I should just be using the Java version of spring...

Thanks SO!

+1  A: 

The python interpreter that is used to compile your Python files is specified by PyDev on the project level. I suspect that while you do have Jython installed, your Eclipse project (katas) still uses CPython.

Perform the following steps to fix this:

  • Open your project properties: right-click your project folder ("katas") and select properties
  • Select tab "PyDev - Interpreter/Grammar"
  • Switch Python to "Jython"

Your files should now be compiled correctly using Jython.

As noted by the asker himself, you may need to restart your editor (or the Eclipse itself).

jsalonen
Thanks jsalonen, I checked this and found that my project's interpreter was already set to Jython.
Ash Kim
A: 

Turns out that I just needed to restart eclipse, there you go.

Ash Kim
Good to know you got the problem fixed! Note as well that my answer is a prerequisite for this trick to work -- your answer didn't include information how to change the project's interpreter. To provide a complete answer, I integrated the restarting to my answer for others to follow as well.And now: happy hacking!
jsalonen
sorry dude - thanks for your help
Ash Kim