shell


Nameshell JSON
Version 1.0.1 PyPI version JSON
download
home_pagehttp://github.com/toastdriven/shell
SummaryA better way to run shell commands in Python.
upload_time2013-06-03 19:25:53
maintainerNone
docs_urlNone
authorDaniel Lindsley
requires_pythonNone
licenseBSD
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            =====
shell
=====

"""A better way to run shell commands in Python."""

Built because every time I go to use `subprocess`_, I spend more time in the
docs & futzing around than actually implementing what I'm trying to get done.

.. _`subprocess`: http://docs.python.org/2.7/library/subprocess.html

Full docs are at https://shell.readthedocs.org/en/latest/.


Requirements
============

* Python 2.6+ or Python 3.3+


Usage
=====

If you just need to quickly run a command, you can use the ``shell`` shortcut
function::

    >>> from shell import shell
    >>> ls = shell('ls')
    >>> for file in ls.output():
    ...     print file
    'another.txt'

If you need to extend the behavior, you can also use the ``Shell`` object::

    >>> from shell import Shell
    >>> sh = Shell(has_input=True)
    >>> cat = sh.run('cat -u')
    >>> cat.write('Hello, world!')
    >>> cat.output()
    ['Hello, world!']

You can even chain calls if you'd like::

    >>> from shell import shell
    >>> shell('cat -u', has_input=True).write('Hello, world!').output()
    ['Hello, world!']


Installation
============

Using ``pip``, simply run::

    pip install shell


License
=======

New BSD
            

Raw data

            {
    "_id": null,
    "home_page": "http://github.com/toastdriven/shell",
    "name": "shell",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Daniel Lindsley",
    "author_email": "daniel@toastdriven.com",
    "download_url": "https://files.pythonhosted.org/packages/71/0c/d6270ed3bf86d036c37929443d7f4a7a8af77dbbce11cec7ddce8d8599c5/shell-1.0.1.tar.gz",
    "platform": "UNKNOWN",
    "description": "=====\nshell\n=====\n\n\"\"\"A better way to run shell commands in Python.\"\"\"\n\nBuilt because every time I go to use `subprocess`_, I spend more time in the\ndocs & futzing around than actually implementing what I'm trying to get done.\n\n.. _`subprocess`: http://docs.python.org/2.7/library/subprocess.html\n\nFull docs are at https://shell.readthedocs.org/en/latest/.\n\n\nRequirements\n============\n\n* Python 2.6+ or Python 3.3+\n\n\nUsage\n=====\n\nIf you just need to quickly run a command, you can use the ``shell`` shortcut\nfunction::\n\n    >>> from shell import shell\n    >>> ls = shell('ls')\n    >>> for file in ls.output():\n    ...     print file\n    'another.txt'\n\nIf you need to extend the behavior, you can also use the ``Shell`` object::\n\n    >>> from shell import Shell\n    >>> sh = Shell(has_input=True)\n    >>> cat = sh.run('cat -u')\n    >>> cat.write('Hello, world!')\n    >>> cat.output()\n    ['Hello, world!']\n\nYou can even chain calls if you'd like::\n\n    >>> from shell import shell\n    >>> shell('cat -u', has_input=True).write('Hello, world!').output()\n    ['Hello, world!']\n\n\nInstallation\n============\n\nUsing ``pip``, simply run::\n\n    pip install shell\n\n\nLicense\n=======\n\nNew BSD",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "A better way to run shell commands in Python.",
    "version": "1.0.1",
    "project_urls": {
        "Download": "UNKNOWN",
        "Homepage": "http://github.com/toastdriven/shell"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c1195fc161e830b08bf2b419a04b0105f2dbf095759148d38cd1e99feadc4146",
                "md5": "95bac7901f7a9646a1a39e1b413345aa",
                "sha256": "64e3347d1dd2c8f3c3f3df5e6ebe9084d768ae20985aef6793854b9f47d4045a"
            },
            "downloads": -1,
            "filename": "shell-1.0.1-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "95bac7901f7a9646a1a39e1b413345aa",
            "packagetype": "bdist_wheel",
            "python_version": "2.7",
            "requires_python": null,
            "size": 5389,
            "upload_time": "2013-12-03T09:57:25",
            "upload_time_iso_8601": "2013-12-03T09:57:25.439100Z",
            "url": "https://files.pythonhosted.org/packages/c1/19/5fc161e830b08bf2b419a04b0105f2dbf095759148d38cd1e99feadc4146/shell-1.0.1-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "710cd6270ed3bf86d036c37929443d7f4a7a8af77dbbce11cec7ddce8d8599c5",
                "md5": "ca7b2c85eb443c907668c8870876e0a6",
                "sha256": "6fbaa88f85de228ddecef33cb1e9037f4959f6f76942b01769e4139a038f6513"
            },
            "downloads": -1,
            "filename": "shell-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "ca7b2c85eb443c907668c8870876e0a6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4486,
            "upload_time": "2013-06-03T19:25:53",
            "upload_time_iso_8601": "2013-06-03T19:25:53.955557Z",
            "url": "https://files.pythonhosted.org/packages/71/0c/d6270ed3bf86d036c37929443d7f4a7a8af77dbbce11cec7ddce8d8599c5/shell-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2013-06-03 19:25:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "toastdriven",
    "github_project": "shell",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "shell"
}
        
Elapsed time: 0.13013s