Dear all, I am new to python and now having a tiny problem about accessing files from python modules I have in my project.. Here is my situation:
Below is the structure of my project /src /src/modules/mod1 /src/modules/mod2 /src/data/file1 /src/data/file2 I wrote some codes in mod1 to access data in file1. And to read the file1, I am hard coding in the mod1, which is something like... open(blahblah/src/data/file1, "w") Now the problems arise when I share my code with other collaborators and the code is not working any more because his/her blahblah before /src is different. Is there a way to make a global variable for the project to make my life easier? Sometime like... PROJECT_PATH/src/modules/mod1 which PROJECT_PATH should work with every machines. All suggestions and advices will be much appreciated. Kann
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor