Examples of runCodeAndGetOutput()


Examples of org.python.pydev.runners.UniversalRunner.AbstractRunner.runCodeAndGetOutput()

            return false;
        }

        AbstractRunner runner = UniversalRunner.getRunner(nature);

        Tuple<String, String> tup = runner.runCodeAndGetOutput(RUN_2_TO_3_CODE, new String[] { "--help" }, null,
                new NullProgressMonitor());
        if (tup.o1.indexOf("ImportError") != -1 || tup.o2.indexOf("ImportError") != -1) {
            MessageBox message = new MessageBox(PyAction.getShell(), SWT.OK | SWT.ICON_ERROR);
            message.setText("Unable to run 2to3");
            message.setMessage("Unable to run 2to3. Details: \n" + tup.o1 + "\n" + tup.o2
View Full Code Here

Examples of org.python.pydev.runners.UniversalRunner.AbstractRunner.runCodeAndGetOutput()

                return 0;
            }
        }
        ArrayList<String> parametersWithResource = new ArrayList<String>(parameters);
        parametersWithResource.add(0, dir);
        Tuple<String, String> tup = runner.runCodeAndGetOutput(RUN_2_TO_3_CODE,
                parametersWithResource.toArray(new String[0]), workingDir, monitor);
        IOConsoleOutputStream out = MessageConsoles.getConsoleOutputStream("2To3", UIConstants.PY_INTERPRETER_ICON);
        try {
            out.write(tup.o1);
            out.write("\n");
View Full Code Here

Examples of org.python.pydev.runners.UniversalRunner.AbstractRunner.runCodeAndGetOutput()

            }
            nature = new SystemPythonNature(interpreterManagerFromType, interpreterInfo);
            AbstractRunner runner = UniversalRunner.getRunner(nature);

            Tuple<String, String> output = runner.runCodeAndGetOutput(GET_DJANGO_VERSION, new String[] {}, null,
                    new NullProgressMonitor());

            String err = output.o2.trim();
            String out = output.o1.trim();
            if (err.length() > 0) {
View Full Code Here

Examples of org.python.pydev.runners.UniversalRunner.AbstractRunner.runCodeAndGetOutput()

                default:
                    projectContainer = projectHandle.getFolder("src");
            }

            String projectName = projectHandle.getName();
            Tuple<String, String> output = runner.runCodeAndGetOutput(RUN_DJANGO_ADMIN, new String[] { "startproject",
                    projectName }, projectContainer.getLocation().toFile(), new NullProgressMonitor());

            if (output.o2.indexOf("ImportError: no module named django") != -1) {
                RunInUiThread.async(new Runnable() {
View Full Code Here

Examples of org.python.pydev.runners.UniversalRunner.AbstractRunner.runCodeAndGetOutput()

    }

    public void testUniversalRunnerWithIronPython() throws Exception {
        AbstractRunner runner = UniversalRunner.getRunner(nature);
        assertEquals(nature.getInterpreterType(), IPythonNature.INTERPRETER_TYPE_IRONPYTHON);
        Tuple<String, String> output = runner.runCodeAndGetOutput(
                "import sys\nprint 'test'\nprint >> sys.stderr, 'err'", null, null, new NullProgressMonitor());
        assertEquals("test", output.o1.trim());
        assertEquals("err", output.o2.trim());

        Tuple<Process, String> createProcess = runner.createProcess(TestDependent.TEST_PYSRC_LOC
View Full Code Here

Examples of org.python.pydev.runners.UniversalRunner.AbstractRunner.runCodeAndGetOutput()

    }

    public void testUniversalRunnerWithJython() throws Exception {
        AbstractRunner runner = UniversalRunner.getRunner(nature);
        assertEquals(nature.getInterpreterType(), IPythonNature.INTERPRETER_TYPE_JYTHON);
        Tuple<String, String> output = runner.runCodeAndGetOutput(
                "import sys\nprint 'test'\nprint >> sys.stderr, 'err'", null, null, new NullProgressMonitor());
        assertEquals("test", output.o1.trim());
        assertEquals("err", output.o2.trim());

        Tuple<Process, String> createProcess = runner.createProcess(TestDependent.TEST_PYSRC_LOC
View Full Code Here

Examples of org.python.pydev.runners.UniversalRunner.AbstractRunner.runCodeAndGetOutput()

    }

    public void testUniversalRunnerWithJython() throws Exception {
        AbstractRunner runner = UniversalRunner.getRunner(nature);
        assertEquals(nature.getInterpreterType(), IPythonNature.INTERPRETER_TYPE_PYTHON);
        Tuple<String, String> output = runner.runCodeAndGetOutput(
                "import sys\nprint 'test'\nprint >> sys.stderr, 'err'", null, null, new NullProgressMonitor());
        assertEquals("test", output.o1.trim());
        assertEquals("err", output.o2.trim());

        Tuple<Process, String> createProcess = runner.createProcess(TestDependent.TEST_PYSRC_LOC
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.