Setting-Up WrappersFor Tosca modules, the syntax is:
For the solver the syntax is:
Example of overriding the ToscaOpt-call:
The Python driver executes the given command-line by appending the command-line of the corresponding module. Here is how the call for the last example would look like:
Both command-lines are concatenated with only a space as a separator. Note:
Specifying the path can be problematic under Windows if using escape characters for the backslashes.
The Python Driver uses the arguments "as is", without any special measure to keep the escape characters.
Techniques and Best PracticesIt is recommended for Windows path specifications to always use the Python raw string format with no escape characters:
If a command-line argument list is about to be used more than once it is advisable to put the arguments into a separate variable and reuse it for the assignments:
Assigning the same tool to all the modules can be done using the Tosca module-enumerable rather than listing each module separately:
Note:
The solver is not included in the above example.
|