{ "info": { "author": "Yu Jian", "author_email": "askingyj@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Operating System :: MacOS", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3" ], "description": "============\r\n About\r\n============\r\n\r\nRunning shell in a Pythonic way.\r\n\r\n============\r\nInstallation\r\n============\r\n\r\n.. code-block :: bash\r\n\r\n $ pip install simplerun\r\n\r\n============\r\n Usage\r\n============\r\n\r\nBasic\r\n=====\r\n\r\n.. code-block :: python\r\n\r\n >> from simplerun import run\r\n >> r = run('ls -l')\r\n >> r\r\n <[0] `ls -l`>\r\n\r\n`0` refers to the exit code here.\r\n\r\n.. code-block :: python\r\n\r\n >> print r.std_out\r\n total 8\r\n -rw-r--r-- 1 yj staff 664 11 19 21:46 README.md\r\n -rw-r--r-- 1 yj staff 829 11 18 22:39 setup.py\r\n drwxr-xr-x 6 yj staff 204 11 19 21:46 simplerun\r\n\r\n\r\nIterable as input\r\n=================\r\n\r\n.. code-block :: python\r\n\r\n >> with open('setup.py') as data:\r\n >> r = run('grep def', data)\r\n >> print(r.std_out)\r\n\r\nResult as input\r\n===============\r\n\r\n.. code-block :: python\r\n\r\n >> r_data = run('ps aux')\r\n >> r = run('grep Chrome', r_data)\r\n\r\nDebugger\r\n========\r\n\r\n.. code-block :: python\r\n\r\n >> r = run('ps aux | stranger | grep keyword')\r\n >> r\r\n <[-1] `stranger`>\r\n >> r.exc\r\n OSError(2, 'No such file or directory')\r\n\r\nFound the `stanger` is the evil\r\n\r\n.. code-block :: python\r\n\r\n >> r.history\r\n [<[0] `ps aux`>]\r\n\r\nreview history, and keep going with good input:\r\n\r\n.. code-block :: python\r\n\r\n >> r.rest\r\n [['grep', 'keyword']]\r\n >>\r\n >> r2 = run(r.rest, '''Good line that contains the keyword\r\n but not this line, sorry.''')\r\n >> print(r2.std_out)\r\n 'Good line that contains the keyword\\n'\r\n\r\nConcurrent & Parallel\r\n=====================\r\n\r\n.. code-block :: python\r\n\r\n >> batches = ['ps', 'top -n 10', 'uptime']\r\n >> r = prun(batches) # paralell running\r\n >> r2 = concurrent_run(batches) # or, running in a concurrent mode", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/netspyer/simplerun", "keywords": "", "license": "UNKNOWN", "maintainer": "", "maintainer_email": "", "name": "simplerun", "package_url": "https://pypi.org/project/simplerun/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/simplerun/", "project_urls": { "Homepage": "https://github.com/netspyer/simplerun" }, "release_url": "https://pypi.org/project/simplerun/0.3.2/", "requires_dist": null, "requires_python": null, "summary": "Make shell script running in a Pythonic way.", "version": "0.3.2" }, "last_serial": 938236, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "530ba94274c9c92bdfcf53c137ccbfe4", "sha256": "98f565865d046e81823a0cb04bf2015d650566f0092ccc9f53c20877fe310f5a" }, "downloads": -1, "filename": "simplerun-0.1.tar.gz", "has_sig": false, "md5_digest": "530ba94274c9c92bdfcf53c137ccbfe4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1801, "upload_time": "2013-11-18T14:42:42", "url": "https://files.pythonhosted.org/packages/24/cd/503d8b66eedd3ea11b6cb184a533bd4bd31e2dcb65eed94d906c1159f9ab/simplerun-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "28d7701a71958bd9f7e9bbd86e93ab7d", "sha256": "9537a56cea2a77ea1eb1f1707e0a638eaca1e524b6d6ad431418f745ecc33026" }, "downloads": -1, "filename": "simplerun-0.2.tar.gz", "has_sig": false, "md5_digest": "28d7701a71958bd9f7e9bbd86e93ab7d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1869, "upload_time": "2013-11-19T14:42:30", "url": "https://files.pythonhosted.org/packages/89/0c/17425057ce42b616d43feae3cfdb8dc98551cc679d822480813b97b42314/simplerun-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "70fda93a9de963e220a8355cdc3a0491", "sha256": "293f0195fd63b5611c83aca29d7893e668802737c296daee2fff5f6ea7c53251" }, "downloads": -1, "filename": "simplerun-0.3.tar.gz", "has_sig": false, "md5_digest": "70fda93a9de963e220a8355cdc3a0491", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3045, "upload_time": "2013-11-25T09:07:30", "url": "https://files.pythonhosted.org/packages/23/59/2faddc359fbe92285c677dd8e8b6d9262f0167ee8f91d959badbd974d39f/simplerun-0.3.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "8b5aab07ceef80890e4befb27905b4b3", "sha256": "5248fed39cff1cec12c6fc3db750d805d55164ff1ce3d10938e22b2c15c02d44" }, "downloads": -1, "filename": "simplerun-0.3.1.tar.gz", "has_sig": false, "md5_digest": "8b5aab07ceef80890e4befb27905b4b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3213, "upload_time": "2013-12-01T14:19:23", "url": "https://files.pythonhosted.org/packages/7e/f7/7ddd3111949ba1977564d3ad6751581b6442282c8c6ee81e1c8d6c881fa7/simplerun-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "372d4be0f70326ba64f5344821305ab4", "sha256": "427047ea0b2d8b7b12824adb34d93a477454cb72311f61ad01001ae58219eb39" }, "downloads": -1, "filename": "simplerun-0.3.2.tar.gz", "has_sig": false, "md5_digest": "372d4be0f70326ba64f5344821305ab4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3246, "upload_time": "2013-12-02T16:55:07", "url": "https://files.pythonhosted.org/packages/71/ca/c37e4aef26819855b7c0b757358c799e0e66c09db811b247aacbd07552cc/simplerun-0.3.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "372d4be0f70326ba64f5344821305ab4", "sha256": "427047ea0b2d8b7b12824adb34d93a477454cb72311f61ad01001ae58219eb39" }, "downloads": -1, "filename": "simplerun-0.3.2.tar.gz", "has_sig": false, "md5_digest": "372d4be0f70326ba64f5344821305ab4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3246, "upload_time": "2013-12-02T16:55:07", "url": "https://files.pythonhosted.org/packages/71/ca/c37e4aef26819855b7c0b757358c799e0e66c09db811b247aacbd07552cc/simplerun-0.3.2.tar.gz" } ] }