-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow dynamic imports in sandbox example #91
Comments
Thanks for reporting this, @kyleconroy. This sort of a duplicate of #23, but with a twist: An alternative approach would be to modify the sandbox example to allow access to a host-provided filesystem via In short, we'd need to address this on both the |
I just had a wild idea: we could optionally iterate over all known modules during pre-initialization and import them one by one (skipping any not currently supported like |
You know, I was thinking the same thing as a workaround. Just add an import for every known module in the standard library. I can try that out and see how big the component becomes. |
With no imports, |
Yeah, that's not bad. You probably already know this, but for anyone else reading: you can also import third-party packages (e.g. NumPy) the same way. |
BTW, |
I'd like to execute code using the sandbox example, but am running into an issue. I want to allow exec'd code to import packages, but if I don't import packages in the host script, the guest code won't run.
The text was updated successfully, but these errors were encountered: