Opening a pipe channel to a sub-process.
Syntax
openPipe(
cmd STRING,
mode STRING )
- cmd is the system command to be executed.
- mode is the open mode, see usage for details.
Usage
With the openPipe() method, you can read from the
standard output of a subprocess, write to the standard input, or both.
The opening
mode can be one of the following:
- r: For read only from standard output of the command.
- w: For write only to standard input of the command.
- a: For write only to standard input of the command.
- u: For read from standard output and write to standard input of the
command.
If the opening
mode is not one of the above letters, the method
will raise error
-8085.
The method raises error -8084 if the channel
cannot be opened.
CALL ch.openPipe( "ls", "r" )