Beispiel #1
0
        protected override Scope /*!*/ CreateScope()
        {
            var modCtx = new ModuleContext(new PythonDictionary(), PythonContext);

            modCtx.Features = ModuleOptions.None;
            modCtx.InitializeBuiltins(true);

            PythonContext.PublishModule("__main__", modCtx.Module);
            modCtx.Globals["__doc__"]  = null;
            modCtx.Globals["__name__"] = "__main__";

            return(modCtx.GlobalScope);
        }