05-07-2014 06:26 PM
Hi Everyone,
On scripting language (Python), at call settings tab, under argument expression -how do I enter the following argument:
-z "c:\Program Files (x86)\7-Zip\7z.exe" -d 192.168.1.50 --fl2 myFilename.fl2 --fl_sel vf_oy
Python script calls "c:\Program Files (x86)\7-Zip\7z.exe" as part of the argument.
The complete call:
python fth.py -z "c:\Program Files (x86)\7-Zip\7z.exe" -d 192.168.1.50 --fl2 myFilename.fl2 --fl_sel vf_oy
I am using Teststand 2012. Thanks,
Frank
05-08-2014 09:45 AM
I'm not sure what the python step is looking for since I don't have that step type, but if it's expecting an expression for the arguments you can specify the following:
"-z \"c:\\Program Files (x86)\\7-Zip\\7z.exe\\\" -d 192.168.1.50 --fl2 myFilename.fl2 --fl_sel vf_oy"
Since backslash is the escape character for string literals (like in C/C++/C#).
-Doug
05-08-2014 11:22 AM
Hi Doug,
Thanks for your help and after running with suggested solution I got code error 2 from Python script:
"-z \"c:\\Program Files (x86)\\7-Zip\\7z.exe\\\" -d 192.168.1.50 --fl2 myFilename.fl2 --fl_sel vf_oy"
However it works fine if I remove the last two "\\"
"-z \"c:\\Program Files (x86)\\7-Zip\\7z.exe\" -d 192.168.1.50 --fl2 myFilename.fl2 --fl_sel vf_oy"
Thanks for your help.
Frank