Skip to content
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

Load built in modules from embedded C# resource #382

Closed
byt3bl33d3r opened this issue Mar 9, 2018 · 2 comments
Closed

Load built in modules from embedded C# resource #382

byt3bl33d3r opened this issue Mar 9, 2018 · 2 comments

Comments

@byt3bl33d3r
Copy link

Hi,

Was wondering if it's possible to load Python's built in modules from an embedded C# resource as supposed to just appending the path to sys.path?

Thanks!

@byt3bl33d3r
Copy link
Author

Just to clarify, by built in modules I mean Python's standard library

@slide
Copy link
Contributor

slide commented Mar 12, 2018

Yes, it is possible to put the stdlib into the assembly as an embedded resource. There is a ResourceMetaPathImporter implementation that can be used. See this SO answer for an example: https://stackoverflow.com/questions/35301682/ironpython-resourcemetapathimporter-failure

@slide slide closed this as completed Mar 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants