Starting from Python 3.1, you can use importlib :
import importlib
foobar = importlib.import_module("foo-bar")
If you can't rename the original file, you could also use a symlink:
ln -s foo-bar.py foo_bar.py
Then you can just:
from foo_bar import *
If you can't rename the module to match Python naming conventions, create a new module to act as an intermediary:
---- foo_proxy.py ----
tmp = __import__('foo-bar')
globals().update(vars(tmp))
---- main.py ----
from foo_proxy 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
Source: Stackoverflow.com