try {
String testCasename = m_ScriptFileDir.getCanonicalPath();
// get the current TestSuitesDirectory
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 + "\"";
}
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();