@Run
The type of run.
Inherits from: Func
Methods
(call) program *args … -> nil overload 1 of 9
Runs a program with the supplied command-line arguments, as
Program.(call) does.
Parameters
| Name | Type | Description |
|---|---|---|
program |
(Str | fs.Path) |
Program name or path. |
:stderr? |
(fs.Path | Str | Sinkable[Str] | :STDOUT:) |
Destination for standard error, or :STDOUT: to merge it with standard
output. |
:policy? |
BaseDict[{?signal: Signal | Int, ?grace: time.Duration | Int | Float, ?force: Bool}] |
Per-launch termination overrides: signal,
grace and force, as
with_policy takes them. |
:mode? |
:LINE: |
Output framing: Str lines by default, or
Bin chunks with :CHUNK:. |
*args |
Value |
Command-line arguments. |
< |
Iter[Value] |
|
> |
Sink[Str] |
(call) program :mode *args … -> nil overload 2 of 9
Runs the program, reading the strand's input and writing the strand's output as chunks.
Parameters
| Name | Type | Description |
|---|---|---|
program |
(Str | fs.Path) |
|
:stderr? |
(fs.Path | Str | Sinkable[Bin] | :STDOUT:) |
|
:policy? |
BaseDict[{?signal: Signal | Int, ?grace: time.Duration | Int | Float, ?force: Bool}] |
|
:mode |
:CHUNK: |
|
*args |
Value |
|
< |
Iter[Value] |
|
> |
Sink[Bin] |
(call) program :stdout *args … -> nil overload 3 of 9
Runs the program, reading the strand's input and writing stdout: as lines.
Parameters
| Name | Type | Description |
|---|---|---|
program |
(Str | fs.Path) |
|
:stdout |
(fs.Path | Str | Sinkable[Str]) |
Destination for standard output. |
:stderr? |
(fs.Path | Str | Sinkable[Str] | :STDOUT:) |
|
:policy? |
BaseDict[{?signal: Signal | Int, ?grace: time.Duration | Int | Float, ?force: Bool}] |
|
:mode? |
:LINE: |
|
*args |
Value |
|
< |
Iter[Value] |
:stdout
A stream receives the bytes as they are, whatever the mode:.
(call) program :stdout :mode … -> nil overload 4 of 9
Runs the program, reading the strand's input and writing stdout: as
chunks.
Parameters
| Name | Type | Description |
|---|---|---|
program |
(Str | fs.Path) |
|
:stdout |
(fs.Path | Str | Sinkable[Bin]) |
|
:stderr? |
(fs.Path | Str | Sinkable[Bin] | :STDOUT:) |
|
:policy? |
BaseDict[{?signal: Signal | Int, ?grace: time.Duration | Int | Float, ?force: Bool}] |
|
:mode |
:CHUNK: |
|
*args |
Value |
|
< |
Iter[Value] |
(call) program :stdin *args … -> nil overload 5 of 9
Runs the program, reading stdin: and writing the strand's output as lines.
Parameters
| Name | Type | Description |
|---|---|---|
program |
(Str | fs.Path) |
|
:stdin |
(fs.Path | Str | io.Io | Iterable[Value]) |
Source for standard input. |
:stderr? |
(fs.Path | Str | Sinkable[Str] | :STDOUT:) |
|
:policy? |
BaseDict[{?signal: Signal | Int, ?grace: time.Duration | Int | Float, ?force: Bool}] |
|
:mode? |
:LINE: |
|
*args |
Value |
|
> |
Sink[Str] |
:stdin
A stream is read as bytes, even when it is also iterable.
(call) program :stdin :mode … -> nil overload 6 of 9
Runs the program, reading stdin: and writing the strand's output as
chunks.
Parameters
| Name | Type | Description |
|---|---|---|
program |
(Str | fs.Path) |
|
:stdin |
(fs.Path | Str | io.Io | Iterable[Value]) |
|
:stderr? |
(fs.Path | Str | Sinkable[Bin] | :STDOUT:) |
|
:policy? |
BaseDict[{?signal: Signal | Int, ?grace: time.Duration | Int | Float, ?force: Bool}] |
|
:mode |
:CHUNK: |
|
*args |
Value |
|
> |
Sink[Bin] |
(call) program :stdin :stdout … -> nil overload 7 of 9
Runs the program, reading stdin: and writing stdout: as lines.
Parameters
| Name | Type | Description |
|---|---|---|
program |
(Str | fs.Path) |
|
:stdin |
(fs.Path | Str | io.Io | Iterable[Value]) |
|
:stdout |
(fs.Path | Str | Sinkable[Str]) |
|
:stderr? |
(fs.Path | Str | Sinkable[Str] | :STDOUT:) |
|
:policy? |
BaseDict[{?signal: Signal | Int, ?grace: time.Duration | Int | Float, ?force: Bool}] |
|
:mode? |
:LINE: |
|
*args |
Value |
(call) program :stdin :stdout … -> nil overload 8 of 9
Runs the program, reading stdin: and writing stdout: as chunks.
Parameters
| Name | Type | Description |
|---|---|---|
program |
(Str | fs.Path) |
|
:stdin |
(fs.Path | Str | io.Io | Iterable[Value]) |
|
:stdout |
(fs.Path | Str | Sinkable[Bin]) |
|
:stderr? |
(fs.Path | Str | Sinkable[Bin] | :STDOUT:) |
|
:policy? |
BaseDict[{?signal: Signal | Int, ?grace: time.Duration | Int | Float, ?force: Bool}] |
|
:mode |
:CHUNK: |
|
*args |
Value |
(index) name -> Program
Creates a proxy for a program.
Parameters
| Name | Type | Description |
|---|---|---|
name |
(Str | fs.Path) |
Program name or path. |