Has the EmbeddedResourceLoader been ported? #1723
Unanswered
checkymander
asked this question in
Q&A
Replies: 1 comment
-
I'm not sure what using System.Collections.Generic;
using System.Reflection;
using IronPython.Hosting;
using IronPython.Modules;
var engine = Python.CreateEngine();
var sysScope = engine.GetSysModule();
IList<object> metaPath = sysScope.GetVariable("meta_path");
var importer = new ResourceMetaPathImporter(Assembly.GetExecutingAssembly(), "scripts.zip");
metaPath.Add(importer);
engine.Execute("import hello"); Where print('hello world!') |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In IronPython2 the ability to load the standard library into C# via embedded resource was possible via the EmbeddedResourceLoader. e.g. #382
This code no longer works in IronPython3, has this functionality been ported/moved somewhere else or has it not been implemented?
Beta Was this translation helpful? Give feedback.
All reactions