Answer the question
In order to leave comments, you need to log in
Import modules from current directory?
Good afternoon!
On the server, importing files that are in the same directory works only through . (dot)
If the dot is removed, then a fatal crash occurs that the module is not found.
Without a dot it worked for python 2.7 after upgrading to 3.5 it stopped.
I read that these versions have a different search priority for modules.
How to make python look first in the current folder and then look for global modules?
The main question is how to get rid of the dot? from .app import app
Answer the question
In order to leave comments, you need to log in
How to make python look first in the current folder and then look for global modules?
Create an empty __init__.py file in the current directory
. The main question is how to get rid of the dot?
Try 2to3, I'm not sure but I think it fixes this problem
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question