Exemple #1
0
        public static void installJython()
        {
            if (false == File.Exists(JythonConfig.zippedJythonRunTime))
            {
                DI.log.error("in installJython, could not find zippedJythonRunTime: {0}", JythonConfig.zippedJythonRunTime);
            }
            else
            {
                DI.log.info("Installing Jython to: {0}", JythonConfig._jythonRuntimeDir);
                new zipUtils().unzipFile(JythonConfig.zippedJythonRunTime, JythonConfig._jythonRuntimeDir);
                if (Directory.Exists(JythonConfig._jythonRuntimeDir))
                {
                    DI.log.info("Jyhton sucessfully installed");
                }
                else
                {
                    DI.log.error("Problem installing/unziping _jythonRuntimeDir: {0}", JythonConfig._jythonRuntimeDir);
                }

                JythonShell.testJython();   // need to run Jython once so that the _Jython_Runtime\cachedir\packages is created and populated
            }
        }