PEP 324 error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Andrew

    PEP 324 error

    It appears PEP 324 is missing the part about check_call():


    ....

    This module also defines two shortcut functions:

    - call(*args, **kwargs):
    Run command with arguments. Wait for command to complete,
    then return the returncode attribute.

    The arguments are the same as for the Popen constructor.
    Example:

    retcode = call(["ls", "-l"])

    Exceptions
    ----------
    ...


    Note the lack of "two shortcut functions".

    In the docstring of subprocess in python 2.5:

    This module also defines two shortcut functions:

    call(*popenargs , **kwargs):
    Run command with arguments. Wait for command to complete, then
    return the returncode attribute.

    The arguments are the same as for the Popen constructor. Example:

    retcode = call(["ls", "-l"])

    check_call(*pop enargs, **kwargs):
    Run command with arguments. Wait for command to complete. If the
    exit code was zero then return, otherwise raise
    CalledProcessEr ror. The CalledProcessEr ror object will have the
    return code in the returncode attribute.

    The arguments are the same as for the Popen constructor. Example:

    check_call(["ls", "-l"])

    I don't know if check_call is going to be deprecated, but there still appears to be a missing function.
    I'm not sure if this is the correct way to report errors, but I think it's prudent to keep the documentation comprehensive.
    --
    Andrew


Working...