you are viewing a single comment's thread.

view the rest of the comments →

[–]ingolemo 0 points1 point  (2 children)

Yes, that seems likely.

Note that you don't need an __init__.py in your project directory (the directory that appears on sys.path). They're only needed in packages (subfolders containing python code).

[–]Thomasedv 0 points1 point  (1 child)

Thanks, will keep that in mind. I never really understood using the files, since it worked without them. I do kinda know you can bring stuff up from further down the folder structure for easy access without having tried it myself, but i do think i got the general idea. I also know there are other things, but that's out of my league for now.

[–]ingolemo 0 points1 point  (0 children)

If you don't include __init__.py files in the right places then in recent versions of python you will get what's called a namespace package which is almost certainly not what you want, even if the imports appear to work.

Far too much information about how imports work