my_main_file.py:
from bfile import bfunc
def fna():
bfunc(sth)
if __name__ == "__main__":
fna()
bfile.py:
def bfunc(sth):
#bla bla..
Error:
name 'bfunc' is not defined
Both files are under same directory
PS: I have tried everythig here Call a function from another file in Python