mirror of
https://github.com/micropython/micropython.git
synced 2025-12-16 09:50:15 +01:00
When `MICROPY_MODULE___FILE__` is enabled and parsing file input, set the global `__file__` variable to the source filename. This matches the behavior of the unix port and provides the current filename to the executing script. Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
2 lines
40 B
Plaintext
2 lines
40 B
Plaintext
__file__ = cmdline/cmd_file_variable.py
|