You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add ability to set python module file string instead of it always being None #2043
When creating a python module from a string (PyModule FromString) the file parameter is always set to None. If I want to create a virtual package structure in memory I need to be able to set file to a specified file structure.
Activity
filmor commentedon Dec 8, 2022
You have to set it yourself, that's how it works in the C-API as well: https://docs.python.org/3/c-api/module.html#c.PyModule_NewObject
filmor commentedon Dec 8, 2022
Sorry, I just saw your PR (#2044), is this not the same as just setting
__file__explicitly on thePyModuleobject?bmello4688 commentedon Dec 8, 2022