does mpy take precedence over py?

General discussions and questions abound development of code with MicroPython that is not hardware specific.
Target audience: MicroPython Users.
Post Reply
Posts: 68
Joined: Tue Jan 22, 2019 2:16 am

does mpy take precedence over py?

Post by smhodge » Sun May 17, 2020 6:10 pm

If you have both a and x.mpy file on /flash or /sd, does the x.mpy file take precedence and get loaded, and the file ignored?

User avatar
Posts: 36
Joined: Fri Sep 22, 2017 3:19 pm
Location: Estonia

Re: does mpy take precedence over py?

Post by aivarannamaa » Sun May 17, 2020 6:45 pm

It seems to be vice versa: ... files.html
When searching a particular directory is looked for first and if that is not found then foo.mpy is looked for, then the search continues in the next directory if neither is found. As such, will take precedence over foo.mpy.

Post Reply