Re: [galaxy-dev] Getting tool dirpath in a Python code file

2011-04-29 Thread Assaf Gordon
Hi Leandro, Leandro Hermida wrote, On 04/29/2011 06:17 AM: > But I have one complication I guess. My tool is already running a Python > code file to dynamically create a drop-down menu using the dynamic_options > attribute a la: > > > ... > > > In this function my_options I would need the t

Re: [galaxy-dev] Getting tool dirpath in a Python code file

2011-04-29 Thread Leandro Hermida
Hi Assaf, On Thu, Apr 28, 2011 at 7:55 PM, Assaf Gordon wrote: > Leandro Hermida wrote, On 04/28/2011 08:55 AM: > > Hi galaxy developers, > > > > Just want to double-check, there is no way to import some kind of galaxy > tool context info into python code you are running for a tool? > > Nothing

Re: [galaxy-dev] Getting tool dirpath in a Python code file

2011-04-28 Thread Assaf Gordon
Leandro Hermida wrote, On 04/28/2011 08:55 AM: > Hi galaxy developers, > > Just want to double-check, there is no way to import some kind of galaxy tool > context info into python code you are running for a tool? Nothing is impossible... just depends on how messy you want to get :) for me, the

Re: [galaxy-dev] Getting tool dirpath in a Python code file

2011-04-28 Thread Leandro Hermida
Hi galaxy developers, Just want to double-check, there is no way to import some kind of galaxy tool context info into python code you are running for a tool? best, leandro On Fri, Apr 15, 2011 at 8:03 PM, Leandro Hermida wrote: > On Fri, Apr 15, 2011 at 7:27 PM, Peter Cock wrote: > >> On Thu,

Re: [galaxy-dev] Getting tool dirpath in a Python code file

2011-04-15 Thread Leandro Hermida
On Fri, Apr 15, 2011 at 7:27 PM, Peter Cock wrote: > On Thu, Apr 14, 2011 at 2:56 PM, Leandro Hermida > wrote: > > On Thu, Apr 14, 2011 at 3:17 PM, Peter Cock > > wrote: > >> > >> For standard Python tools in Galaxy, I'm using > >> os.path.split(sys.argv[0])[0] > >> to get the path, which on ref

Re: [galaxy-dev] Getting tool dirpath in a Python code file

2011-04-15 Thread Peter Cock
On Thu, Apr 14, 2011 at 2:56 PM, Leandro Hermida wrote: > On Thu, Apr 14, 2011 at 3:17 PM, Peter Cock > wrote: >> >> For standard Python tools in Galaxy, I'm using >> os.path.split(sys.argv[0])[0] >> to get the path, which on reflection probably should be written as >> os.path.dirname(sys.argv[0]

Re: [galaxy-dev] Getting tool dirpath in a Python code file

2011-04-15 Thread Leandro Hermida
Hi sorry to ping again, but do any of the Galaxy developers have advice/recommended approach for the problem in this thread? On Thu, Apr 14, 2011 at 3:56 PM, Leandro Hermida wrote: > On Thu, Apr 14, 2011 at 3:17 PM, Peter Cock wrote: > >> On Thu, Apr 14, 2011 at 2:08 PM, Leandro Hermida >> wrot

Re: [galaxy-dev] Getting tool dirpath in a Python code file

2011-04-14 Thread Leandro Hermida
On Thu, Apr 14, 2011 at 3:17 PM, Peter Cock wrote: > On Thu, Apr 14, 2011 at 2:08 PM, Leandro Hermida > wrote: > > Hi, > > > > I have a tool with a 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.abspat

Re: [galaxy-dev] Getting tool dirpath in a Python code file

2011-04-14 Thread Peter Cock
On Thu, Apr 14, 2011 at 2:08 PM, Leandro Hermida wrote: > Hi, > > I have a tool with a 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

[galaxy-dev] Getting tool dirpath in a Python code file

2011-04-14 Thread Leandro Hermida
Hi, I have a tool with a 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