Package org.python.util

Examples of org.python.util.PythonInterpreter.cleanup()


                properties.setProperty("python.home", StaticConfiguration.JYTHON_HOME);
                PythonInterpreter.initialize(System.getProperties(), properties, new String[]{""});
                PythonInterpreter interp = new PythonInterpreter(new org.python.core.PyStringMap(), new org.python.core.PySystemState());
                interp.setOut(output);
                interp.setErr(output);
                interp.cleanup();
                //java -cp %JYTHON_HOME%\jython.jar -Dpython.home=%JYTHON_HOME% -Dpython.path=%FORMATTER_DIR% org.python.util.jython %JYTHON_HOME%\Lib\pythondoc.py -f -s -Otestscriptdoc_xmlformatter -Dtestsuite_dir=%TEST_SUITE_DIR% !TEST_SCRIPTS!
                String args = "import sys;sys.argv[1:]= ['" + campaignFile +  "']";
                interp.exec(args);
                interp.exec("__name__ = '__main__'");
                interp.exec("execfile(r'" + StaticConfiguration.QTASTE_ROOT + "/tools/TestProcedureDoc/generateTestCampaignDoc.py')");
View Full Code Here


                //java -cp %JYTHON_HOME%\jython.jar -Dpython.home=%JYTHON_HOME% -Dpython.path=%FORMATTER_DIR% org.python.util.jython %JYTHON_HOME%\Lib\pythondoc.py -f -s -Otestscriptdoc_xmlformatter -Dtestsuite_dir=%TEST_SUITE_DIR% !TEST_SCRIPTS!
                String args = "import sys;sys.argv[1:]= ['" + campaignFile +  "']";
                interp.exec(args);
                interp.exec("__name__ = '__main__'");
                interp.exec("execfile(r'" + StaticConfiguration.QTASTE_ROOT + "/tools/TestProcedureDoc/generateTestCampaignDoc.py')");
                interp.cleanup();
                interp = null;

            } catch (PyException e) {
                System.err.println("Exception occurs executing PythonInterpreter:" + e.value);
            }
View Full Code Here

            properties.setProperty("python.path", StaticConfiguration.JYTHON_LIB);
            PythonInterpreter.initialize(System.getProperties(), properties, new String[]{""});
            PythonInterpreter interp = new PythonInterpreter(new org.python.core.PyStringMap(), new org.python.core.PySystemState());
            interp.setOut(output);
            interp.setErr(output);
            interp.cleanup();
            //java -cp %JYTHON_HOME%/jython.jar;%QTASTE_ROOT%/kernel/target/qtaste-kernel-deploy.jar -Dpython.home=%JYTHON_HOME% -Dpython.path=%FORMATTER_DIR% org.python.util.jython %JYTHON_HOME%\Lib\pythondoc.py -f -s -Otestscriptdoc_xmlformatter %TEST_SCRIPT% -V
            //java -cp %JYTHON_HOME%\jython.jar -Dpython.home=%JYTHON_HOME% -Dpython.path=%FORMATTER_DIR% org.python.util.jython %JYTHON_HOME%\Lib\pythondoc.py -f -s -Otestscriptdoc_xmlformatter -Dtestsuite_dir=%TEST_SUITE_DIR% !TEST_SCRIPTS!
            String args = "import sys;sys.argv[1:]= ['-V', '-f', '-s', '-Otestscriptdoc_xmlformatter', '" + testScriptFile.getAbsolutePath() + "']";
            interp.exec(args);
            interp.exec("__name__ = '__main__'");
View Full Code Here

            //java -cp %JYTHON_HOME%\jython.jar -Dpython.home=%JYTHON_HOME% -Dpython.path=%FORMATTER_DIR% org.python.util.jython %JYTHON_HOME%\Lib\pythondoc.py -f -s -Otestscriptdoc_xmlformatter -Dtestsuite_dir=%TEST_SUITE_DIR% !TEST_SCRIPTS!
            String args = "import sys;sys.argv[1:]= ['-V', '-f', '-s', '-Otestscriptdoc_xmlformatter', '" + testScriptFile.getAbsolutePath() + "']";
            interp.exec(args);
            interp.exec("__name__ = '__main__'");
            interp.exec("execfile(r'" + StaticConfiguration.JYTHON_HOME + "/Lib/pythondoc.py')");
            interp.cleanup();
            interp = null;
        } catch (Exception e) {
            System.err.println("Error executing PythonInterpreter " + e.getMessage());
        }
View Full Code Here

            m_TestSuiteDir = m_TestSuiteDir.replace("\\", "/");
            StringWriter output = new StringWriter();
            PythonInterpreter interp = new PythonInterpreter(new org.python.core.PyStringMap(), new org.python.core.PySystemState());
            interp.setOut(output);
            interp.setErr(output);
            interp.cleanup();
            //java -cp %JYTHON_HOME%\jython.jar -Dpython.home=%JYTHON_HOME% -Dpython.path=%FORMATTER_DIR% org.python.util.jython %JYTHON_HOME%\Lib\pythondoc.py -f -s -Otestscriptdoc_xmlformatter -Dtestsuite_dir=%TEST_SUITE_DIR% !TEST_SCRIPTS!           
            String args = "import sys;sys.argv[1:]= ['-f', '-s', '-Otestscriptdoc_xmlformatter'";
            if (new File(m_TestSuiteDir).getCanonicalFile() == new File("TestSuites").getCanonicalFile()) {
              args += ",\"-DrootTestSuiteDir=" + m_TestSuiteDir + "\"";
            }
View Full Code Here

            }
            args+=", r'" + testCasename + "']";
            interp.exec(args);
            interp.exec("__name__ = '__main__'");
            interp.exec("execfile(r'" + StaticConfiguration.JYTHON_LIB + "/pythondoc.py')");
            interp.cleanup();
            interp = null;
            if (xmlDocFile.exists()) {
                final String[] args2 = new String[]{"-XSLTC", "-XT", "-IN", xmlDocFilename, "-XSL", StaticConfiguration.TEST_SCRIPT_DOC_TOOLS_DIR + "/testscriptdoc_xml2html.xsl", "-OUT", htmlDocFilename};
                org.apache.xalan.xslt.Process.main(args2);
                xmlDocFile.delete();
View Full Code Here

            properties.setProperty("python.path", StaticConfiguration.FORMATTER_DIR);
            PythonInterpreter.initialize(System.getProperties(), properties, new String[]{""});
            PythonInterpreter interp = new PythonInterpreter(new org.python.core.PyStringMap(), new org.python.core.PySystemState());
            interp.setOut(outputs);
            interp.setErr(outputs);
            interp.cleanup();
            //java -cp %JYTHON_HOME%\jython.jar -Dpython.home=%JYTHON_HOME% -Dpython.path=%FORMATTER_DIR% org.python.util.jython %JYTHON_HOME%\Lib\pythondoc.py -f -s -Otestscriptdoc_xmlformatter -Dtestsuite_dir=%TEST_SUITE_DIR% !TEST_SCRIPTS!
            String args = "import sys;sys.argv[1:]= ['-f', '-s', '-Otestscriptdoc_xmlformatter', '-Dtestsuite_dir=" + testSuiteDir.replace(File.separator, "/") + "'," + testScriptsList.toString().replace(File.separator, "/") + "]";
            System.out.println(args);
            interp.exec(args);
            interp.exec("__name__ = '__main__'");
View Full Code Here

            String args = "import sys;sys.argv[1:]= ['-f', '-s', '-Otestscriptdoc_xmlformatter', '-Dtestsuite_dir=" + testSuiteDir.replace(File.separator, "/") + "'," + testScriptsList.toString().replace(File.separator, "/") + "]";
            System.out.println(args);
            interp.exec(args);
            interp.exec("__name__ = '__main__'");
            interp.exec("execfile(r'" + StaticConfiguration.JYTHON_HOME + "/Lib/pythondoc.py')");
            interp.cleanup();
            interp = null;
        }
        catch (Exception e) {
            System.err.println("GenerateTestSuiteDoc - Exception occurs executing PythonInterpreter:" + e.getMessage());
            e.printStackTrace();
View Full Code Here

            StringWriter output = new StringWriter();
            PythonInterpreter interp = new PythonInterpreter(new org.python.core.PyStringMap(), new org.python.core.PySystemState());

            interp.setOut(output);
            interp.setErr(output);
            interp.cleanup();

            //java -cp %JYTHON_HOME%\jython.jar -Dpython.home=%JYTHON_HOME% -Dpython.path=%FORMATTER_DIR% org.python.util.jython %JYTHON_HOME%\Lib\pythondoc.py -f -s -Otestscriptdoc_xmlformatter -Dtestsuite_dir=%TEST_SUITE_DIR% !TEST_SCRIPTS!
            String args = "import sys;sys.argv[1:]= ['" + directory +  "']";

            interp.exec(args);
View Full Code Here

            interp.exec("__name__ = '__main__'");

            interp.exec("execfile(r'" + StaticConfiguration.FORMATTER_DIR + "/stepsmoduledoc_xmlformatter.py')");

            interp.cleanup();
            interp = null;
        }
        catch (Exception e) {
            System.err.println("Exception occurs executing PythonInterpreter:" + e.getMessage());
        }
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.