> There's a couple of places in NWSGI where I need a CodeContext, so > I've just been creating an empty one like so and using it (and it's > worked so far): > new CodeContext(new Scope(), > HostingHelpers.GetLanguageContext(engine)) > > Now, in 2.6 RC I need a PythonDictionary instead of a scope (easy > enough), but I need a ModuleContext instead of a Language context (for > argument 2) - how do I get one of those? > > Also, this all feels horribly wrong - is there a better way that I'm > missing?
Rather than creating a CodeContext w/ a ModuleContext you can create a ModuleContext w/ a PythonDictionary & LanguageContext. From there you can the ModuleContext's GlobalContext property. _______________________________________________ Users mailing list [email protected] http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
