+ 3
How do you import modules with hyphens?
I'm trying to import a module with a hyphen, but when I try to import it like this: Import foo-bar Python thinks that the hyphen is a minus symbol. I have also tried: foo_bar = __import__('foo-bar') But then it says: Module 'foo-bar' not found. I have heard that you should rename the module but I don't know how.
2 Respuestas