I have a function that checks if a module is installed, if not it will install it. I am passing the extension through a function. However how can I stop it attempting to import the variable name and use its contents?
Example:
def importExtension(extension):
try:
import extension
except:
Do stuff
importExtension("blah")
del extensionafterimport