Is it possible to import a module that contains '-' characters in the filename?
i.e.
import my-python-module
or do you have to rename the file, i.e.
mv my-python-module.py my_python_module.py
and then..
import my_python_module
Is it possible to import a module that contains '-' characters in the filename?
i.e.
import my-python-module
or do you have to rename the file, i.e.
mv my-python-module.py my_python_module.py
and then..
import my_python_module
From PEP 8 -- Style Guide for Python Code:
Modules should have short, all-lowercase names. Underscores can be used in the module name if it improves readability. Python packages should also have short, all-lowercase names, although the use of underscores is discouraged.
PEP 8 is the more-or-less "official" coding standard for Python code.