So I have the directory struture like this
Execute_directory--> execute.py
|
Algorithm ---> algorithm.py
|
|--> data.txt
So I am inside execute directory and have included the following path to my python path.
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + "/../Algorithm")
algorithm.py has a code to read data.txt
So when I run execute.py , execute.py calls algorithm.py which in turns read data.txt I thought that above line should have done the job. it is able to find algorithm.py but not data.txt??
IOError: [Errno 2] No such file or directory:'data.txt'
Any clue what I am doing wrong ?? Thanks