Porting micropython : close all open files. #10310
-
I help to port MicroPython to CASIO calculators with gint, but MicroPython is not closing files correctly and that is causing file locks. I want to now if there is a function that can close all open files ? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 3 replies
-
Do you know, which files stay open? |
Beta Was this translation helpful? Give feedback.
-
The .py files imported as modules. |
Beta Was this translation helpful? Give feedback.
-
@mibi88 Sorry about the delay responding... It's impossible to provide more information without some more details. How does the port work, is it available (e.g. on github). Is this the official one that Casio ship with their calculators? Do you use the VFS, etc? |
Beta Was this translation helpful? Give feedback.
-
No it's not the official port. It's a port that's not official : https://gitea.planet-casio.com/Lephenixnoir/PythonExtra |
Beta Was this translation helpful? Give feedback.
-
It's been a while, but since this issue has come up again I wanted to leave a trace here for future Internet users. The problem actually occurred specifically when an error was raised during an import. I found that |
Beta Was this translation helpful? Give feedback.
It's been a while, but since this issue has come up again I wanted to leave a trace here for future Internet users.
The problem actually occurred specifically when an error was raised during an import. I found that
mp_parse()
did not free the lexer in this case, which has been fixed a few months ago by 5e122b1. Question answered, I believe. :)