With these files in the root of CIRCUITPY
fake_lib/
a_spritesheet.bmp
fake_lib.py
When you do in the REPL:
It seems to be trying to import the directory. The contents of fake_lib.py are just print("Hello fake_lib.py") and that value never gets printed.
If you change the name of fake_lib/ to something else then run the same import it will execute the code inside of fake_lib.py
In CPython testing the same scenario results in the opposite behavior, the .py file will get executed even when the folder name matches it.
Testing was done on:
Adafruit CircuitPython 10.0.0-beta.3 on 2025-08-29; Adafruit Feather RP2040 with rp2040
But I also noticed this on Fruit Jam, and assume it is on all devices.
With these files in the root of CIRCUITPY
When you do in the REPL:
It seems to be trying to import the directory. The contents of
fake_lib.pyare justprint("Hello fake_lib.py")and that value never gets printed.If you change the name of
fake_lib/to something else then run the same import it will execute the code inside offake_lib.pyIn CPython testing the same scenario results in the opposite behavior, the .py file will get executed even when the folder name matches it.
Testing was done on:
But I also noticed this on Fruit Jam, and assume it is on all devices.