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:mattmora...@gmail.com]
Sent: Thursday, May 06, 2010 1:03 PM
To: staf-users@lists.sourceforge.net
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
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to