nb_cli.handlers.process

def ensure_process_terminated(func)

  • 参数

    • func ((P) -> Coroutine[Any, Any, asyncio.subprocess.Process])
  • 返回

    • (P) -> Coroutine[Any, Any, asyncio.subprocess.Process]

async def create_process(*args, cwd=None, stdin=None, stdout=None, stderr=None)

  • 参数

    • *args (str | bytes | os.PathLike[str] | os.PathLike[bytes])

    • cwd (Path | None)

    • stdin (IO[Any] | int | None)

    • stdout (IO[Any] | int | None)

    • stderr (IO[Any] | int | None)

  • 返回

    • asyncio.subprocess.Process

async def create_process_shell(command, cwd=None, stdin=None, stdout=None, stderr=None)

  • 参数

    • command (str | bytes)

    • cwd (Path | None)

    • stdin (IO[Any] | int | None)

    • stdout (IO[Any] | int | None)

    • stderr (IO[Any] | int | None)

  • 返回

    • asyncio.subprocess.Process

async def terminate_process(process)

  • 参数

    • process (asyncio.subprocess.Process)
  • 返回

    • None