Timeline for Importing Submodules Python 3
Current License: CC BY-SA 3.0
5 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 20, 2020 at 9:12 | history | edited | Community Bot |
Commonmark migration
|
|
| Feb 1, 2018 at 22:18 | comment | added | Joshua R. |
What if you add an __init__.py file to the project directory? Or alternatively, you may not need the '.' in from .example import foo after all, just for importing test_foo
|
|
| Feb 1, 2018 at 22:06 | comment | added | Joshua R. |
Did you also add the dot to the tests import, from .tests import test_foo?
|
|
| Feb 1, 2018 at 22:02 | comment | added | italianfoot |
I get a ModuleNotFoundError: No module named '__main__.example'; '__main__' is not a package
|
|
| Feb 1, 2018 at 21:55 | history | answered | Joshua R. | CC BY-SA 3.0 |