Package org.python.pydev.runners

Examples of org.python.pydev.runners.SimplePythonRunner


        junit.textui.TestRunner.run(PythonTest.class);
    }

    protected Throwable exec(File f) {
        System.out.println(com.aptana.shared_core.string.StringUtils.format("Running: %s", f));
        Tuple<String, String> output = new SimplePythonRunner().runAndGetOutput(new String[] {
                TestDependent.PYTHON_EXE, "-u", FileUtils.getFileAbsolutePath(f) }, f.getParentFile(), null, null, "utf-8");

        System.out.println(com.aptana.shared_core.string.StringUtils.format("stdout:%s\nstderr:%s", output.o1, output.o2));

        if (output.o2.toLowerCase().indexOf("failed") != -1 || output.o2.toLowerCase().indexOf("traceback") != -1) {
View Full Code Here


                Throwable e = new RuntimeException("PyLint ERROR: Nature not configured for: " + project);
                Log.log(e);
                return;
            }

            Tuple<String, String> outTup = new SimplePythonRunner().runAndGetOutputFromPythonScript(nature
                    .getProjectInterpreter().getExecutableOrJar(), scriptToExe, paramsToExe, arg.getParentFile(),
                    project);

            write("PyLint: The stdout of the command line is: " + outTup.o1, out);
            write("PyLint: The stderr of the command line is: " + outTup.o2, out);
View Full Code Here

            throw new RuntimeException("A jar cannot be used in order to get the info for the python interpreter.");
        }

        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) {
View Full Code Here

     *
     */
    public void testEnv() throws CoreException, IOException {

        File relativePath = PydevPlugin.getBundleInfo().getRelativePath(new Path("pysrc/interpreterInfo.py"));
        String string = new SimplePythonRunner().runAndGetOutput(
                new String[] { TestDependent.PYTHON_EXE, relativePath.getCanonicalPath() }, null, null, null, "utf-8").o1;
        assertNotNull(string);
        //System.out.println(string);
    }
View Full Code Here

TOP

Related Classes of org.python.pydev.runners.SimplePythonRunner

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.