ProcessConnection

ProcessConnection[proc,"stream"]

返回给定流的流对象.

更多信息

  • 可能的流的数值为:
  • "StandardInput"可以写入的流,过程将从中读取数据
    "StandardOutput"可以从中读取数据的流,过程将写入数据
    "StandardError"可以从中读取信息的错误流,过程将写入数据

范例

基本范例  (2)

开始系统壳过程:

写一条壳命令:

读取壳命令的输出:

写一条无效的壳命令:

ProcessConnection 从标准错误流中读取信息:

开始系统壳过程:

ProcessConnection 获取标准输入流:

ProcessConnection 获取标准输出流:

向壳内写入两条命令. 在多数情况下,一个过程和它的流可互换使用:

读取两条命令的输出:

Wolfram Research (2014),ProcessConnection,Wolfram 语言函数,https://reference.wolfram.com/language/ref/ProcessConnection.html.

文本

Wolfram Research (2014),ProcessConnection,Wolfram 语言函数,https://reference.wolfram.com/language/ref/ProcessConnection.html.

CMS

Wolfram 语言. 2014. "ProcessConnection." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/ProcessConnection.html.

APA

Wolfram 语言. (2014). ProcessConnection. Wolfram 语言与系统参考资料中心. 追溯自 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: 21-November-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: 21-November-2024 ]}