Re: Passing arguments to Python script in batch

Date : Fri, 25 May 2007 09:13:20 -0700
To : XSI_MailingList <XSI(at)Softimage.COM>
From : Greg Smith <greg(at)stanwinston.com>
Subject : Re: Passing arguments to Python script in batch
Yeah python script batching doesn't work in 5.11 you have to make a stub
script in Jscript that executes the python script using the input
arguments in the Jscript Stub script.

so the Jscript would look like this: 

function stub(pyScript, myFunctionName, args)
{
	Application.ExecuteScript(pyScript, "Python", myFunctionName, args.split(","));
}
pyScript: the address where your python script lives on your filesystem
myFunction: Name of the function to be called in your python script
args: arguments will be in string syntax, delimited by commas.

Kinda funky that you have to call a jscript in order to do a python script, however was the only way I could get it to work.

Greg


> On 5/25/07, Halfdan Ingvarsson <hingvars(at)softimage.com> wrote:
> >
> >
> > I see. I tested this in 6.0, where it works. Might be a  problem related to 5.11.
> >
> >  - Â
> 
> ---
> Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
> unsubscribe xsi


---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi


Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available.
This site supposedly brought to you by Benjamin Grosser and the Imaging Technology Group.