src
|
-- Country
|
-- test_file.py -> test_file(function)
-- State
|
-- test_file.py -> i want to run this file
I have to run the test_file in State which is the present working directory. I have to import the function test_file from test_file in country.
Using the path
import sys
sys.path.append('../Country')
from test_file import *
print test_file()
When i run the file. It says role_name function not found. It is not able to find the function. But if i change the name of the file in Country from test_file to some other name, Its working fine. I am thinking this problem has to do with some kind of ambiguousness.
I need to have the same name for both files. Is there another way out for this problem?