From 4d9897512d2f66cfb22509ad76d2f1d1319fb1e5 Mon Sep 17 00:00:00 2001 From: Prodesire Date: Thu, 14 Dec 2017 19:55:37 +0800 Subject: [PATCH] fix func name error in cmd doc --- docs/cmd.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/cmd.rst b/docs/cmd.rst index fb56a81..2a5154e 100644 --- a/docs/cmd.rst +++ b/docs/cmd.rst @@ -1,18 +1,18 @@ Cmd ------- -.. py:function:: pydu.cmd.execute(cmd, wait=True, shell=True) +.. py:function:: pydu.cmd.run(cmd, wait=True, shell=True) - Execute cmd based on ``subprocess.Popen``. - If ``wait`` is True, ``execute`` will return the tuple of ``(returncode, stdout)``. - Note, ``stderr`` is redirected to ``stdout``. If ``wait`` is False, ``execute`` + Run cmd based on ``subprocess.Popen``. + If ``wait`` is True, ``run`` will return the tuple of ``(returncode, stdout)``. + Note, ``stderr`` is redirected to ``stdout``. If ``wait`` is False, ``run`` will return object of ``Popen``. ``shell`` is same to parameter of ``Popen``. - >>> from pydu.cmd import execute - >>> execute('echo hello') + >>> from pydu.cmd import run + >>> run('echo hello') (0, b'hello\r\n') # Python 3 - >>> execute('echo hello', wait=False) + >>> run('echo hello', wait=False)