Re: [BangPypers] Module question

2008-09-01 Thread Heshan Suriyaarachchi
Hi Abhinav, I managed to overcome the problem. Thanx :) On Tue, Sep 2, 2008 at 11:03 AM, abhinav sarkar <[EMAIL PROTECTED]>wrote: > > > On Tue, Sep 2, 2008 at 10:51 AM, Abhinav Sarkar <[EMAIL PROTECTED]>wrote: > >> Heshan Suriyaarachchi wrote: >> >>> Hi, >>>One of my scripts returns a

Re: [BangPypers] Module question

2008-09-01 Thread abhinav sarkar
On Tue, Sep 2, 2008 at 10:51 AM, Abhinav Sarkar <[EMAIL PROTECTED]>wrote: > Heshan Suriyaarachchi wrote: > >> Hi, >>One of my scripts returns a module like below. >> > '/home/heshan/repo/scripts/annotationScript.py'> >> What I need to do is to extract the full path of the location of the >

Re: [BangPypers] Module question

2008-09-01 Thread Heshan Suriyaarachchi
Hi, What I need to do is somehow extract the 4th item of the below data structre. i.e. the full path Hi, > __path__ attribute of module contains the path of file. > >>> import lastfm > >>> lastfm.__path__ > ['c:\\python25\\lib\\site-packages\\lastfm-0.1-py2.5.egg\\lastfm'] > > I hope it help

Re: [BangPypers] Module question

2008-09-01 Thread Abhinav Sarkar
Heshan Suriyaarachchi wrote: Hi, One of my scripts returns a module like below. '/home/heshan/repo/scripts/annotationScript.py'> What I need to do is to extract the full path of the location of the script as string. i.e. '/home/heshan/repo/scripts/annotationScript.py' . Since I am dyn

[BangPypers] Module question

2008-09-01 Thread Heshan Suriyaarachchi
Hi, One of my scripts returns a module like below. What I need to do is to extract the full path of the location of the script as string. i.e. '/home/heshan/repo/scripts/annotationScript.py' . Since I am dynamically loading the script, it's name and full path may vary. Can you suggest me