simSubprocess.exec
Description
|
Execute a subprocess. |
Lua synopsis |
int exitCode, string output=simSubprocess.exec(string programPath, string[] args, string input="", exec_opts opts={})
|
Lua parameters |
programPath (string): Program path.
args (table of string): Program arguments.
input (string, default: ""): Data passed to stdin.
opts (exec_opts, default: {}): Options. see exec_opts
|
Lua return values |
exitCode (int):
output (string):
|
Python synopsis |
int exitCode, string output=simSubprocess.exec(string programPath, list args, string input="", exec_opts opts={})
|
See also
|
|
simSubprocess.execAsync
Description
|
Execute a subprocess without waiting for termination. |
Lua synopsis |
string handle=simSubprocess.execAsync(string programPath, string[] args, exec_opts opts={})
|
Lua parameters |
programPath (string): Program path.
args (table of string): Program arguments.
opts (exec_opts, default: {}): Options. see exec_opts
|
Lua return values |
handle (string): |
Python synopsis |
string handle=simSubprocess.execAsync(string programPath, list args, exec_opts opts={})
|
See also
|
|
simSubprocess.isRunning
Description
|
Check wether a subprocess previously launched with simSubprocess.execAsync is running. |
Lua synopsis |
bool running=simSubprocess.isRunning(string handle)
|
Lua parameters |
handle (string): |
Lua return values |
running (bool): |
Python synopsis |
bool running=simSubprocess.isRunning(string handle)
|
See also
|
|
simSubprocess.kill
Description
|
Forcefully terminate a subprocess previously launched with simSubprocess.execAsync. |
Lua synopsis |
int exitCode=simSubprocess.kill(string handle)
|
Lua parameters |
handle (string): |
Lua return values |
exitCode (int): |
Python synopsis |
int exitCode=simSubprocess.kill(string handle)
|
See also
|
|
simSubprocess.wait
Description
|
Wait for termination of a subprocess previously launched with simSubprocess.execAsync. If subprocess terminates, the exit code is returned. |
Lua synopsis |
int exitCode=simSubprocess.wait(string handle, float timeout=5)
|
Lua parameters |
handle (string):
timeout (float, default: 5):
|
Lua return values |
exitCode (int): |
Python synopsis |
int exitCode=simSubprocess.wait(string handle, float timeout=5)
|
See also
|
|
|
Data structures
Data structures are used to pass complex data around. Create data structures in Lua in the form of a map, e.g.: {line_size=3, add_to_legend=false, selectable=true}
exec_opts
Description
|
|
Fields |
useSearchPath (bool, default: true): Resolve program name searching in PATH entries.
openNewConsole (bool, default: false): Win32-specific flag.
|
See also
|
|
|