Metadata-Version: 2.1
Name: subprocessor
Version: 0.9.1
Summary: Run a subprocess with callbacks
Home-page: https://github.com/rec/subprocessor
Author: Tom Ritchford
Author-email: tom@swirly.com
License: MIT
Keywords: backups
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Utilities

subprocessor:
--------------------

⛏️subprocesses for subhumanses  ⛏️
=========================================

Run a command in a subprocess and yield lines from stdout and stderr

Examples:

.. code-block:: python

   from subprocessor import Call

   for is_error, line in Call('ls foo bar NO_EXIST'):
       print(is_error, line)


`Call(cmd, sleep=0, count=None, **kwds)`
    An iterator for (is_error, line) pairs from a subprocess.

cmd:
    A list or tuple of strings, or a string, to run in a subprocess.

    If shell=True, Popen expects a string, so if ``cmd`` is a list, it
    is joined using shlex.

    If shell=False, Popen expects a list of strings, so if ``cmd`` is a
    string, it is split using shlex

sleep:
    How long to sleep between checking the process, in seconds

count:
    Maximum number of lines to retrieve at a time from the streams
    stdout and stderr. If count is empty, retrieve lines until the
    stream blocks.

kwds:
    Keywords that are passed to subprocess.Popen


