subprocess.run


Namesubprocess.run JSON
Version 0.0.8 PyPI version JSON
download
home_pagehttps://github.com/xando/subprocess.run
SummaryThe subprocess module extension to run processes.
upload_time2013-11-16 14:32:41
maintainerNone
docs_urlNone
authorSebastian Pawluś
requires_pythonNone
licenseCopyright (c) 2013, Sebastian Pawluś. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of the FreeBSD Project.
keywords subprocess run process
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            ==========================
from subprocess import run
==========================

The **subprocess** extension to run processes.


.. code-block:: python

   >>> from subprocess import run

   >>> run('uname -r').stdout
   3.7.0-7-generic

   >>> run('uname -a').status
   0

   >>> print run('rm not_existing_directory').stderr
   rm: cannot remove `not_existing_directory': No such file or directory

   >>> print run('ls -la', 'wc -l')
   14


To use pipe from the shell.

.. code-block:: python

  from subprocess import run
  run('grep something', data=run.stdin)

.. code-block:: bash

  $ ps aux | python script.py


Install
-------

You can install it from PyPi, by simply **pip**:

.. code-block:: bash

   $ pip install subprocess.run

to test it, launch **python**

.. code-block:: python

   >>> from subprocess import run


Supported platforms
-------------------

* Python2.6
* Python2.7
* Python3.3
* PyPy2.1


Tests
-----

.. image:: https://travis-ci.org/xando/subprocess.run.png?branch=master
   :target: https://travis-ci.org/xando/subprocess.run

.. code-block:: bash

   >>> python setup.py test
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/xando/subprocess.run",
    "name": "subprocess.run",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "subprocess run process",
    "author": "Sebastian Pawlu\u015b",
    "author_email": "sebastian.pawlus@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/16/fc/fe70ed1cc117b8351ca40fad918ebb7230e85039d9cd449eebdfc2ebaa81/subprocess.run-0.0.8.tar.gz",
    "platform": "any",
    "description": "==========================\nfrom subprocess import run\n==========================\n\nThe **subprocess** extension to run processes.\n\n\n.. code-block:: python\n\n   >>> from subprocess import run\n\n   >>> run('uname -r').stdout\n   3.7.0-7-generic\n\n   >>> run('uname -a').status\n   0\n\n   >>> print run('rm not_existing_directory').stderr\n   rm: cannot remove `not_existing_directory': No such file or directory\n\n   >>> print run('ls -la', 'wc -l')\n   14\n\n\nTo use pipe from the shell.\n\n.. code-block:: python\n\n  from subprocess import run\n  run('grep something', data=run.stdin)\n\n.. code-block:: bash\n\n  $ ps aux | python script.py\n\n\nInstall\n-------\n\nYou can install it from PyPi, by simply **pip**:\n\n.. code-block:: bash\n\n   $ pip install subprocess.run\n\nto test it, launch **python**\n\n.. code-block:: python\n\n   >>> from subprocess import run\n\n\nSupported platforms\n-------------------\n\n* Python2.6\n* Python2.7\n* Python3.3\n* PyPy2.1\n\n\nTests\n-----\n\n.. image:: https://travis-ci.org/xando/subprocess.run.png?branch=master\n   :target: https://travis-ci.org/xando/subprocess.run\n\n.. code-block:: bash\n\n   >>> python setup.py test",
    "bugtrack_url": null,
    "license": "Copyright (c) 2013, Sebastian Pawlu\u015b.\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met: \n\n1. Redistributions of source code must retain the above copyright notice, this\n   list of conditions and the following disclaimer. \n2. Redistributions in binary form must reproduce the above copyright notice,\n   this list of conditions and the following disclaimer in the documentation\n   and/or other materials provided with the distribution. \n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\nANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\nThe views and conclusions contained in the software and documentation are those\nof the authors and should not be interpreted as representing official policies, \neither expressed or implied, of the FreeBSD Project.",
    "summary": "The subprocess module extension to run processes.",
    "version": "0.0.8",
    "project_urls": {
        "Download": "UNKNOWN",
        "Homepage": "https://github.com/xando/subprocess.run"
    },
    "split_keywords": [
        "subprocess",
        "run",
        "process"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "16fcfe70ed1cc117b8351ca40fad918ebb7230e85039d9cd449eebdfc2ebaa81",
                "md5": "bbb69faff2cdeeffedb2248ee9da2ac9",
                "sha256": "5760270139acc4cc4058184e539f5b613dbe0073d84ee43247c2e0fc5c04db4e"
            },
            "downloads": -1,
            "filename": "subprocess.run-0.0.8.tar.gz",
            "has_sig": false,
            "md5_digest": "bbb69faff2cdeeffedb2248ee9da2ac9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4092,
            "upload_time": "2013-11-16T14:32:41",
            "upload_time_iso_8601": "2013-11-16T14:32:41.239477Z",
            "url": "https://files.pythonhosted.org/packages/16/fc/fe70ed1cc117b8351ca40fad918ebb7230e85039d9cd449eebdfc2ebaa81/subprocess.run-0.0.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2013-11-16 14:32:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "xando",
    "github_project": "subprocess.run",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "tox": true,
    "lcname": "subprocess.run"
}
        
Elapsed time: 0.10822s