Hi,

I have a tool with a <code file="my_script.py"/> tag and in that code file I'm trying to get the tool dirpath where that script and the tool XML exist.  I've tried:

os.path.abspath(os.path.dirname(sys.argv[0]))
os.path.abspath(os.path.dirname(__file__))

And both don't work as expected. Is there a galaxy class I could import which will have the tool directory path?

regards,
Leandro