Folks, I would like to import python files, and functions dynamically. The modulenames should be passed to a function like so:
def scrape(url, foo):
modulename = url['modulename']
import modulename
modulename.modulename(url, foo)
This is erroring out with:
ImportError: No module named modulename
So how can we get python to use 'modulename' as a variable?
Thanks!