I have a scenario where I want to be able automate the setting up of various Python interpreters for use in PyDev. These interpreters have special environment variables, forced built-ins and libraries defined. Is there a way through perhaps an .ini file or through the PyDev / Jython API to programmatically define Python interpreters for PyDev?
In the Java API it's something as:
IInterpreterManager manager = PydevPlugin.getPythonInterpreterManager(true);
manager.setInfos(exesList, interpreterNamesToRestore, monitor);
The exesList is a list of org.python.pydev.ui.pythonpathconf.InterpreterInfo
and the interpreterNamesToRestore
a list of the interpreters that were changed (i.e.: should have the pythonpath restored).
You could probably do this from Jython, but PyDev provides no hooks where you'd be able to do that (i.e.: it only provides hooks for setting up an editor), so, the best solution right now would be creating a simple eclipse plugin that had an earlyStartup to do the configuration you want (should be straightforward).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With