[Pydev-code] Programmatically set python interpreter and create project
Brought to you by:
fabioz
From: Thomas J. <th...@sk...> - 2011-02-17 10:24:32
|
Hi, I'm trying to programmatically, in a new workspace, - set python interpreter whose details are known, - create a pydev project, using the interpreter. I've tried things along the lines of String interpreterpersistedstring = "Name:dwspython:EndName:Version2.6......&&&&&"; // as previously obtained from a getPersistedString IInterpreterManager im = PydevPlugin.getPythonInterpreterManager(); im.setPersistedString(interpreterpersistedstring); and then create the project using PyStructureConfigHelpers.createPydevProject(projectname, projectLocationPath, null, // IProject[] references monitor, IPythonNature.PYTHON_VERSION_2_6, "dwspython", null, null, null); The immediate problem with this is that the interpreter set with setPersistedString is not known by createPydevProject also confirmed by im.hasInfoOnInterpreter("dwspython") returning false. A call im.saveInterpretersInfoModulesManager(); does not help either it seems. Any help and hints on how to do this properly is greatly appreciated! Thanks, -- Thomas Johnsson |