importing a module from a file without the '.py' suffix
rosuav at gmail.com
Fri Oct 22 08:26:20 EDT 2021
On Fri, Oct 22, 2021 at 10:36 PM Antoon Pardon <antoon.pardon at vub.be> wrote:
> I have a file with python code but the name doesn't end with the '.py'
> What is the easiest way to import this code as a module without changing
> its name?
It should be possible to use importlib for this:
More information about the Python-list