I want to import foo-bar.py. This works:
foobar = __import__(\"foo-bar\")
This does not:
from \"foo-bar\" import *
<
Like other said you can't use the "-" in python naming, there are many workarounds, one such workaround which would be useful if you had to add multiple modules from a path is using sys.path
For example if your structure is like this:
foo-bar
├── barfoo.py
└── __init__.py
import sys
sys.path.append('foo-bar')
import barfoo