Package org.python.pydev.ui.pythonpathconf

Examples of org.python.pydev.ui.pythonpathconf.InterpreterInfo


        File script = getInterpreterInfoPy();

        Tuple<String, String> outTup = new SimpleIronpythonRunner().runAndGetOutputWithInterpreter(executable,
                FileUtils.getFileAbsolutePath(script), null, null, null, monitor, "utf-8");

        InterpreterInfo info = createInfoFromOutput(monitor, outTup, askUser);

        if (info == null) {
            //cancelled
            return null;
        }

        info.restoreCompiledLibs(monitor);

        return new Tuple<InterpreterInfo, String>(info, outTup.o1);
    }
View Full Code Here


        File script = getInterpreterInfoPy();

        Tuple<String, String> outTup = new SimplePythonRunner().runAndGetOutputWithInterpreter(executable,
                FileUtils.getFileAbsolutePath(script), null, null, null, monitor, "utf-8");

        InterpreterInfo info = createInfoFromOutput(monitor, outTup, askUser);

        if (info == null) {
            //cancelled
            return null;
        }

        info.restoreCompiledLibs(monitor);

        return new Tuple<InterpreterInfo, String>(info, outTup.o1);
    }
View Full Code Here

     * @throws MisconfigurationException
     * @see org.python.pydev.core.IInterpreterManager#getInterpreterInfo(java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
     */
    public InterpreterInfo getInterpreterInfo(String executable, IProgressMonitor monitor)
            throws MisconfigurationException {
        InterpreterInfo info = super.getInterpreterInfo(executable, monitor);
        if (!info.executableOrJar.equals(TestDependent.JYTHON_JAR_LOCATION)) {
            throw new RuntimeException("expected same");
        }
        return info;
    }
View Full Code Here

    }

    @Override
    public IInterpreterInfo[] getInterpreterInfos() {
        String defaultInterpreter = getDefaultInterpreter();
        InterpreterInfo info = (InterpreterInfo) this.createInterpreterInfo(defaultInterpreter,
                new NullProgressMonitor(), false);
        if (!InterpreterInfo.isJythonExecutable(defaultInterpreter)
                && !InterpreterInfo.isIronpythonExecutable(defaultInterpreter)) {
            TestDependent.PYTHON_EXE = info.executableOrJar;
        }
View Full Code Here

     * @throws MisconfigurationException
     * @see org.python.pydev.core.IInterpreterManager#getInterpreterInfo(java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
     */
    public InterpreterInfo getInterpreterInfo(String executable, IProgressMonitor monitor)
            throws MisconfigurationException {
        InterpreterInfo info = super.getInterpreterInfo(executable, monitor);
        if (!InterpreterInfo.isJythonExecutable(executable) && !InterpreterInfo.isIronpythonExecutable(executable)) {
            TestDependent.PYTHON_EXE = info.executableOrJar;
        }
        return info;
    }
View Full Code Here

    }

    @Override
    public IInterpreterInfo[] getInterpreterInfos() {
        String defaultInterpreter = getDefaultInterpreter();
        InterpreterInfo info = (InterpreterInfo) this.createInterpreterInfo(defaultInterpreter,
                new NullProgressMonitor(), false);
        if (!InterpreterInfo.isJythonExecutable(defaultInterpreter)) {
            TestDependent.IRONPYTHON_EXE = info.executableOrJar;
        }
        return new IInterpreterInfo[] { info };
View Full Code Here

     * @throws MisconfigurationException
     * @see org.python.pydev.core.IInterpreterManager#getInterpreterInfo(java.lang.String, org.eclipse.core.runtime.IProgressMonitor)
     */
    public InterpreterInfo getInterpreterInfo(String executable, IProgressMonitor monitor)
            throws MisconfigurationException {
        InterpreterInfo info = super.getInterpreterInfo(executable, monitor);
        if (!InterpreterInfo.isJythonExecutable(executable)) {
            TestDependent.IRONPYTHON_EXE = info.executableOrJar;
        }
        return info;
    }
View Full Code Here

            //restore manager and cache
            setInterpreterManager(path);
            restoredSystem = this.getClass();

            //get default and restore the pythonpath
            InterpreterInfo info = getDefaultInterpreterInfo();
            this.beforeRestore(info);
            info.restoreCompiledLibs(getProgressMonitor());
            if (ADD_MX_TO_FORCED_BUILTINS) {
                info.addForcedLib("mx");
            }
            if (ADD_NUMPY_TO_FORCED_BUILTINS) {
                info.addForcedLib("numpy");
            }

            //postconditions
            afterRestorSystemPythonPath(info);
            return true;
View Full Code Here

    /**
     * @return the default interpreter info for the current manager
     */
    protected InterpreterInfo getDefaultInterpreterInfo() {
        IInterpreterManager iMan = getInterpreterManager();
        InterpreterInfo info;
        try {
            info = (InterpreterInfo) iMan.getDefaultInterpreterInfo(false);
        } catch (MisconfigurationException e) {
            throw new RuntimeException(e);
        }
View Full Code Here

     * @param path
     */
    protected void setInterpreterManager(String path) {
        PythonInterpreterManager interpreterManager = new PythonInterpreterManager(this.getPreferences());

        InterpreterInfo info;
        info = (InterpreterInfo) interpreterManager.createInterpreterInfo(TestDependent.PYTHON_EXE,
                new NullProgressMonitor(), false);
        TestDependent.PYTHON_EXE = info.executableOrJar;
        if (path != null) {
            info = new InterpreterInfo(info.getVersion(), info.executableOrJar,
                    PythonPathHelper.parsePythonPathFromStr(path, new ArrayList<String>()));
        }

        interpreterManager.setInfos(new IInterpreterInfo[] { info }, null, null);
        PydevPlugin.setPythonInterpreterManager(interpreterManager);
View Full Code Here

TOP

Related Classes of org.python.pydev.ui.pythonpathconf.InterpreterInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.