Not sure why XSIBatch is doing it but as a workround you can always pass just one argument as a string representing a dict and parse it back in main().

Alternatively you can use optparse (python 2.6) or argeparse (python 2.7) module in your main() to consume arguments.

On 10/16/2013 11:21 AM, Schoenberger wrote:
Hi


Quick question:
I have a new python script and I named the args, but XSIBatch ignores the arg names and placed them in the same order as written in the commandline. No matter the arg name.
The issue is that I do not want to/can not  specify all parameters.
So I cannot set them into the same order as in the script.
Am I missing something?


Commandline:
XSIBatch -thread 8 -script "kso_softimage.py" -lang Python -main main -args -inSName "rendertest.scn" -inDb "To_Delete" -inPass "PassA" -inKSOMode true


kso_softimage.py:
def main(inKSOMode="", inSName="",inDb="",inPass=""):
logMessage("","######################################################")
    logMessage("","inKSOMode " + str(inKSOMode))
    logMessage("","inSName " + str(inSName))
    logMessage("","inDb " + str(inDb))
    logMessage("","inPass " + str(inPass))


Output:
 ######################################################
 inKSOMode rendertest.scn
 inSName To_Delete
 inDb PassA
 inPass true



Holger Schoenberger
technical director
The day has 24 hours, if that does not suffice, I will take the night






--

ALOK

GANDHI

/ directeur technique senior- senior technical director


alok.gan...@modusfx.com <mailto:alok.gan...@modusfx.com>

T:

*450 430-0010 x225

F:

*450 430-0009
www.modusfx.com <http://www.modusfx.com>

---------------------------------------------------------------------------------------------


MODUS

FX


120 Rue Turgeon,


Sainte-Therese (Quebec) CANADA J7E 3J1


Follow us on

Facebook <http://www.facebook.com/ModusFX>

&

Twitter <https://twitter.com/Modusfx>
**

Reply via email to