Ejemplo n.º 1
0
        public void Initialize()
        {
            this._view = new View();

            IronPythonEvaluationContext lang = new IronPythonEvaluationContext();

            this._repl = new Repl(this._view, lang);
        }
Ejemplo n.º 2
0
        private void ServeLocalInteraction()
        {
            while (!_shutdown)
            {
                IronPythonEvaluationContext lang = new IronPythonEvaluationContext();
                Repl repl = new Repl(new ConsoleReplView(), lang);

                // HACK: load static scripts so I have something to test
                repl.LoadScripts(_staticScripts);

                Task t = repl.Main();

                t.Wait();

                if (!_shutdown)
                {
                    Console.Out.WriteLine("!!! local interaction detached; restarting (server.Shutdown() to shut down server)...");
                }
            }
        }