Skip to main content

spawn

Function spawn 

Source
pub fn spawn(config: &ProcessConfig) -> Result<Spawned>
Expand description

按 config 启动 Python 进程,三个标准流均为管道。

Windows 上以 CREATE_NO_WINDOW 启动,避免弹出控制台窗口。

§Errors

进程无法创建时(如解释器不存在)返回底层 I/O 错误。