Matt, Another way to resolve the problem is to use the mode="'shell'" attribute:
<command mode="'shell'">'%s %s %s' % (python_script, var1, var2)</command>
Thanks,
David
David Bender 11501 Burnet Rd. Phone (T/L): 1-512-286-5315
STAF/STAX Development Bldg. 903-5B002 (363-5315)
Austin, TX ITN: 23635315
IBM Software Group, 78758-3400 Email: [email protected]
WPLC
From: Matt <[email protected]>
To: "[email protected]"
<[email protected]>
Date: 05/06/2010 08:05 AM
Subject: Re: [staf-users] stax process command
Hi Bodo,
That fixed it!
Thanks,
Matt
On 6 May 2010 13:47, Strösser, Bodo <[email protected]> wrote:
Hi Matt,
I fell into the same pitfall some time ago.
IIRC, in the 'Getting started' there is an example having command name
and parameters in the <command> element.
But at least on Linux this does not work.
You should use the <parms> element to specify params:
python_script = '{STAF/Config/STAFRoot}/scripts/myscript.py'
var1 = '2'
var2 = '90'
<command>python_script</command>
<parms>'%s %s' % (var1, var2)</parms>
HTH
Bodo
From: Matt [mailto:[email protected]]
Sent: Thursday, May 06, 2010 1:03 PM
To: [email protected]
Subject: [staf-users] stax process command
Hi all,
I have an issue under Linux AMD64 running STAX.
python_script = '{STAF/Config/STAFRoot}/scripts/myscript.py'
var1 = '2'
var2 = '90'
<command>'%s' % (python_script)</command>
The above works fine, however when I try and add parameters.
python_script = '{STAF/Config/STAFRoot}/scripts/myscript.py'
var1 = '2'
var2 = '90'
<command>'%s %s %s' % (python_script, var1, var2)</command>
The process failed to start, RC: 10, STAFResult: Invalid
command: /opt/staf/scripts/myscript.py 2 90
The command is not a file or does not have execute permissions.
OS RC2
Any ideas?
Matt
------------------------------------------------------------------------------
_______________________________________________
staf-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/staf-users
<<inline: graycol.gif>>
<<inline: ecblank.gif>>
------------------------------------------------------------------------------
_______________________________________________ staf-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/staf-users
