ProcessConnection

ProcessConnection[proc,"stream"]

returns the stream object for a given stream.

Details

  • Possible stream values are:
  • "StandardInput"a stream that can be written to, from which the process will read
    "StandardOutput"a stream that can be read from, to which the process will write
    "StandardError"an error stream that can be read from, to which the process will write

Examples

Basic Examples  (2)

Start the system shell process:

Write a shell command:

Read the shell command output:

Write an invalid shell command:

Use ProcessConnection to read from the standard error stream:

Start the system shell process:

Get the standard input stream using ProcessConnection:

Get the standard output stream using ProcessConnection:

Write two commands into the shell. A process and its streams can be used interchangeably in most cases:

Read the two command outputs:

Wolfram Research (2014), ProcessConnection, Wolfram Language function, https://reference.wolfram.com/language/ref/ProcessConnection.html.

Text

Wolfram Research (2014), ProcessConnection, Wolfram Language function, https://reference.wolfram.com/language/ref/ProcessConnection.html.

CMS

Wolfram Language. 2014. "ProcessConnection." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ProcessConnection.html.

APA

Wolfram Language. (2014). ProcessConnection. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ProcessConnection.html

BibTeX

@misc{reference.wolfram_2024_processconnection, author="Wolfram Research", title="{ProcessConnection}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/ProcessConnection.html}", note=[Accessed: 22-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_processconnection, organization={Wolfram Research}, title={ProcessConnection}, year={2014}, url={https://reference.wolfram.com/language/ref/ProcessConnection.html}, note=[Accessed: 22-December-2024 ]}