Hi Binu,

On 13/12/2004, at 4:11 PM, Binu K S wrote:
This should get you the module's path:

import sys
sys.modules['rpy'].__file__


Unfortunately it's not the rpy module itself whose path I'm looking for. It's the absolute path of my module that I've created.


If my script was called runRScript.py, and it was in the same directory as someScript.r, I'm only able to get it working if I run

        python runRScript.py

from the same directory. In otherwords, I can't be in a child directory and run:

        python ../runRScript.py

because runRScript depends internally on the file someScript.r, and can't find it.

I've found a pathconf module posted earlier to this group, which does half the job. Unfortunately, when I call get_rootdir() it returns '/usr/bin' instead of my project's root directory ;(

Lars

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to