I want to import a function from another file in the same directory.
Sometimes it works for me with from .mymodule import myfunction but sometimes I get
from .mymodule import myfunction
if both packages are in your import path (sys.path), and the module/class you want is in example/example.py, then to access the class without relative import try:
from example.example import fkt