コード例 #1
0
        protected override ScriptEngine MakeEngine(Stream stream, TextWriter writer, TextReader reader)
        {
            _factory.SetConsoleOut(writer);
            _factory.SetConsoleError(writer);
            _factory.SetConsoleIn(reader);

            var runtime = (ScriptRuntime)_factory.CreateRuntime(Python.CreateRuntimeSetup(GetOptions()));
            var res     = runtime.GetEngine("Python");

            InitializeEngine(stream, writer, res);
            return(res);
        }
コード例 #2
0
 protected override void RedirectIO(Stream /*!*/ stream, TextWriter /*!*/ writer, TextReader /*!*/ reader)
 {
     _factory.SetConsoleOut(writer);
     _factory.SetConsoleError(writer);
     _factory.SetConsoleIn(reader);
 }