{ "info": { "author": "ruifengyun", "author_email": "rfyiamcool@163.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 6 - Mature", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.0", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "### \u4ecb\u7ecd\n\n\u4e00\u4e2asubprocess\u6a21\u5757\u7684\u5c01\u88c5,\u53ef\u4ee5\u66f4\u65b9\u4fbf\u7684\u8fdb\u884c\u7cfb\u7edf\u8c03\u7528\n\nTo Do List:\n\n1. return realtime result\n2. task async run\n\n[\u5f00\u53d1easyrun\u7684\u73af\u5883\u662fpython3\u54e6]\n\n### \u5b89\u88c5\n\npip\u5b89\u88c5\n```\npip install easyrun\n```\n\n\u6e90\u7801\u5b89\u88c5\n```\ngit clone git@github.com:rfyiamcool/easyrun.git\ncd easyrun\npython setup.py install\n```\n\n### \u4f7f\u7528\u65b9\u6cd5\n\n\u53ea\u5355\u7eaf\u7684\u6267\u884c\uff0c\u7136\u540e\u8fd4\u56delinux run code\u548c\u6267\u884c\u72b6\u6001\n\n```\n>>> import easyrun\n>>> r = easyrun.run('uptime')\n 04:06:37 up 2 min, 1 user, load average: 0.20, 0.19, 0.08\n>>> r.output\n>>> r.success\nTrue\n>>> r.retcode\n0\n```\n\n\u6355\u6349\u6240\u6709\u7684\u6267\u884c\u7ed3\u679c\n```\n>>> r = easyrun.run_capture('uptime')\n>>> r.output\n' 04:07:16 up 2 min, 1 user, load average: 0.11, 0.17, 0.08\\n'\n>>> r.success\nTrue\n>>> r.retcode\n0\n```\n\n\u628a\u8f93\u51fa\u7684\u7ed3\u679c\u7cbe\u7b80\u8fc7,maxlines\u662f\u63a7\u5236\u884c\u6570\n```\nprint(run_capture_limited('ls', maxlines=2).output)\n```\n\neasyrun example usage:\n\n```\nfrom easyrun import run_capture\n\nr = run_capture('ls -la')\nif r.success:\n print(r.output)\nelse:\n print(\"Error: '%s' exit code %s\" % (r.command, r.retcode))\n print(\" ...\")\n # print last three lines of output\n for line in r.output.splitlines()[-3:]:\n print(\" %s\" % line)\n```", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/rfyiamcool/easyrun", "keywords": "subprocess easyrun,fengyun", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "easyrun", "package_url": "https://pypi.org/project/easyrun/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/easyrun/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/rfyiamcool/easyrun" }, "release_url": "https://pypi.org/project/easyrun/3.9.3/", "requires_dist": null, "requires_python": null, "summary": "a simple subprocess manager,suport stream stdout \\ async", "version": "3.9.3" }, "last_serial": 1711954, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "723b6db52b7f5c3b7ddfff168ec9937f", "sha256": "d59027e69841e05b4f2f3bf8b9848b8c8b738804371d8473ad60828206a9f67a" }, "downloads": -1, "filename": "easyrun-1.0.tar.gz", "has_sig": false, "md5_digest": "723b6db52b7f5c3b7ddfff168ec9937f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1719, "upload_time": "2015-09-06T10:12:41", "url": "https://files.pythonhosted.org/packages/cf/90/a33706b5c792c62aad118697b67808ed1455727de28d422f1bbd37e78f1c/easyrun-1.0.tar.gz" } ], "2.0": [ { "comment_text": "", "digests": { "md5": "4c4ecbbfef0894ad567d0d8e722984f7", "sha256": "fec8bb9c054e43b124a41facbb107833a012cd070c27a034a9f58175787c2e38" }, "downloads": -1, "filename": "easyrun-2.0.tar.gz", "has_sig": false, "md5_digest": "4c4ecbbfef0894ad567d0d8e722984f7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1770, "upload_time": "2015-09-06T10:26:02", "url": "https://files.pythonhosted.org/packages/35/2d/5e80bacd2157e8c5c09e0ff1cacc76954afc78597b9dc843b02c62fb1447/easyrun-2.0.tar.gz" } ], "3.0": [ { "comment_text": "", "digests": { "md5": "46f8c0fbd487947b678704ba0b627a06", "sha256": "afe927a41070b1f734a683856118898c7b2a45142bd8be503359a19d4fe019df" }, "downloads": -1, "filename": "easyrun-3.0.tar.gz", "has_sig": false, "md5_digest": "46f8c0fbd487947b678704ba0b627a06", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1887, "upload_time": "2015-09-06T10:29:34", "url": "https://files.pythonhosted.org/packages/44/11/b54e877b36d0a92d787c86c36c5eb92266c275750d076ab3b6c583c083f4/easyrun-3.0.tar.gz" } ], "3.1": [ { "comment_text": "", "digests": { "md5": "7253c74dffd9c0f3d81d1ab4adc0c60d", "sha256": "0f2925ff6f01b68d49ae4ab28e3aeb6cdf7f001c507e28e9b419753ac72b0dcc" }, "downloads": -1, "filename": "easyrun-3.1.tar.gz", "has_sig": false, "md5_digest": "7253c74dffd9c0f3d81d1ab4adc0c60d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2548, "upload_time": "2015-09-06T10:40:31", "url": "https://files.pythonhosted.org/packages/3b/00/8d34789af38cf19ee68f1fb576d5ec37262bdd478cfe55b597e6ee888f63/easyrun-3.1.tar.gz" } ], "3.2": [ { "comment_text": "", "digests": { "md5": "b95b497b534770083508e5d0f5f61bc8", "sha256": "50fc88522fcda195d884a94ed9e362b4f8d528b92b15909425f9ee1672e751b0" }, "downloads": -1, "filename": "easyrun-3.2.tar.gz", "has_sig": false, "md5_digest": "b95b497b534770083508e5d0f5f61bc8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2551, "upload_time": "2015-09-06T10:50:17", "url": "https://files.pythonhosted.org/packages/f0/21/e5dafe0e06ba16587471eccdc8817b97d977f16f124e3e7f53f4bab39078/easyrun-3.2.tar.gz" } ], "3.5": [ { "comment_text": "", "digests": { "md5": "de30298416a86b130ee227f81cc7bc07", "sha256": "d47682d09537146a26aeddd13de1ed3afe7de8c74038ab66136bcc9bdbfe1b0b" }, "downloads": -1, "filename": "easyrun-3.5.tar.gz", "has_sig": false, "md5_digest": "de30298416a86b130ee227f81cc7bc07", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2573, "upload_time": "2015-09-07T02:13:57", "url": "https://files.pythonhosted.org/packages/79/de/9ff65b4bb556a367cac7a828d9540bf8143c1d05a8d5797226330042eac1/easyrun-3.5.tar.gz" } ], "3.6": [ { "comment_text": "", "digests": { "md5": "58c0aff599186cd59cc2e273c3a4a267", "sha256": "c452c0e47dec7f375953dc5dd418c7dfe55e1ee0ee293c4c3f9688c6c976ee1d" }, "downloads": -1, "filename": "easyrun-3.6.tar.gz", "has_sig": false, "md5_digest": "58c0aff599186cd59cc2e273c3a4a267", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2593, "upload_time": "2015-09-07T04:41:13", "url": "https://files.pythonhosted.org/packages/2c/ba/c6c8fdf951af9294a26de795cca021c66db4624e56b3154fab16030723af/easyrun-3.6.tar.gz" } ], "3.7": [ { "comment_text": "", "digests": { "md5": "8fe99fc15a654695b439a37132091530", "sha256": "872b304ead532f5b46871c9b05d0abad8e57a5a505e7c9d2ba6ac6434d7d89eb" }, "downloads": -1, "filename": "easyrun-3.7.tar.gz", "has_sig": false, "md5_digest": "8fe99fc15a654695b439a37132091530", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2624, "upload_time": "2015-09-07T06:30:22", "url": "https://files.pythonhosted.org/packages/63/0c/5346a4825b76566d5d123037c1069a3492978721dcb9b2f771ac2b17319e/easyrun-3.7.tar.gz" } ], "3.8": [ { "comment_text": "", "digests": { "md5": "d9a484a798e70cafb27c73fd946ed77f", "sha256": "3889d354b5f5b185a20993b1755b83b5a638cee379967f53508f203abd68f16e" }, "downloads": -1, "filename": "easyrun-3.8.tar.gz", "has_sig": false, "md5_digest": "d9a484a798e70cafb27c73fd946ed77f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2692, "upload_time": "2015-09-07T16:01:08", "url": "https://files.pythonhosted.org/packages/c6/cb/8e1308f32dd98aa8c9822ab6a6936830a383b55a9c46c66d4df041e8aef1/easyrun-3.8.tar.gz" } ], "3.9.2": [ { "comment_text": "", "digests": { "md5": "4a052f2a642af528936e408d9345f3af", "sha256": "f31f8b080ccd9a5496ef54b716123ca79d91013b46013c81f65d3f36288499b8" }, "downloads": -1, "filename": "easyrun-3.9.2.tar.gz", "has_sig": false, "md5_digest": "4a052f2a642af528936e408d9345f3af", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3032, "upload_time": "2015-09-07T16:39:44", "url": "https://files.pythonhosted.org/packages/19/08/2e27e4bdd11ee687a6a98f9c708f6153659f25f14f1ccd0ce55cc8c8bbe8/easyrun-3.9.2.tar.gz" } ], "3.9.3": [ { "comment_text": "", "digests": { "md5": "a372d8bacef13ffb1020f116c3218536", "sha256": "dc5ed5ed10c62bf357100cc04357e18028a8383d4f464b3e753bdce35f165c18" }, "downloads": -1, "filename": "easyrun-3.9.3.tar.gz", "has_sig": false, "md5_digest": "a372d8bacef13ffb1020f116c3218536", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3096, "upload_time": "2015-09-07T16:54:44", "url": "https://files.pythonhosted.org/packages/fe/e1/9e6128c856550b2c165df99da046ff92ccb785e1ad3993dffe8e9d556006/easyrun-3.9.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a372d8bacef13ffb1020f116c3218536", "sha256": "dc5ed5ed10c62bf357100cc04357e18028a8383d4f464b3e753bdce35f165c18" }, "downloads": -1, "filename": "easyrun-3.9.3.tar.gz", "has_sig": false, "md5_digest": "a372d8bacef13ffb1020f116c3218536", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3096, "upload_time": "2015-09-07T16:54:44", "url": "https://files.pythonhosted.org/packages/fe/e1/9e6128c856550b2c165df99da046ff92ccb785e1ad3993dffe8e9d556006/easyrun-3.9.3.tar.gz" } ] }