Re: [Tutor] Ideas about global variables for accessing project's file

2011-01-12 Thread Kann Vearasilp
The ConfigParser works perfectly! Thanks a bunch! Kann On Wed, 2011-01-12 at 13:59 +, Alan Gauld wrote: > "Kann Vearasilp" wrote > > > 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_

Re: [Tutor] Ideas about global variables for accessing project's file

2011-01-12 Thread Alan Gauld
"Kann Vearasilp" wrote 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. You can use a relative path based on your installatiojn root You can use a config file

Re: [Tutor] Ideas about global variables for accessing project's file

2011-01-12 Thread Walter Prins
Hi, On 12 January 2011 13:11, Kann Vearasilp wrote: > 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 i

[Tutor] Ideas about global variables for accessing project's file

2011-01-12 Thread Kann Vearasilp
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 d