This project has moved and is read-only. For the latest updates, please go here.

How to configure Visual Studio to use Jython

Oct 21, 2011 at 12:40 PM

Hello, is it possible to use Jython intrepiter with Visual Studio (there are some Modules and Java crap) that IronPython will not run and large Python code base is using and there is no other choice of using IronPython.

Thanks for the info.

Oct 21, 2011 at 5:41 PM

You can manually configure an interpreter using Tools->Options->Python Tools->Interpreter Options->Add Interpreter.  Then you can setup the interpreter to point at jython.bat in the Jython install folder.  From there we'll treat it just like any other Python interpreter.  The downside there is that we probably won't recognize any of the Java types/namespaces but we should be able to give you completions for the Python std lib, site-packages, etc...

If someone was interested in improving Jython support they could update so that it recognized when it was running on Jython and generated additional info (we already do this for IronPython).  Or even better someone could implement IPythonInterpreterFactoryProvider and the other associated interfaces to directly plugin Jython support into PTVS - that could enable doing the reflection against Java packages at runtime rather than needing to pre-compute it (again, something we currently do for IronPython).