[Fixed]-My program dont recognize beetwen modules & core i am on python2

1đź‘Ť

You just need to add a blank __init__.py to your anubis and anubis/core directories, and this should work. If you don’t have the __init__.py file, python will not think that the directory is a module.

The __init__.py files are required to make Python treat the directories as containing packages; this is done to prevent directories with a common name, such as string, from unintentionally hiding valid modules that occur later on the module search path. In the simplest case, __init__.py can just be an empty file

Python docs

👤2ps

0đź‘Ť

You can try this:

from anubis.core import wcolors

OR you can change a name for “core”, it could be a keyword for django and python.

👤Cody Zhou

Leave a comment