Python import path containing reserved keyword

Import a module from a path containing a reserved keyword like is.

This import statement fails because the word is is a reserved in python.

from import resources

Use importlib to import.

import importlib
mymodule = importlib.import_module('')
This post is available on GitHub.
Posted .


Leave a Reply