Use Godot file api to import python modules
This is needed for #78: once exported all game resources (including python modules/packages) are packed in a single zip archive (e.g. my_game.pck), this way python interpreter crash when trying to import something which is in this archive.
Two solutions:
- add a hook to
os.opento fallback to godot file api when regular open fails. - add a hook on
__import__to fallback whenModuleNotFoundErroris raised
Any progress on this? I can't run an exported project because the python interpreter itself is hidden away in the pck - inflating file size but can't be used :(
Idon't think I'd be able to do that but by curiosity ... What should we modify to make those enhancements? Your Sources or the Godot sources?
@fuderiki this is a change to be done on Godot-Python side, dealing with the import system of python specifically