{ "info": { "author": "Reuven V. Gonzales", "author_email": "reuven@tobetter.us", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: POSIX", "Programming Language :: Python" ], "description": "subwrap - A very thin wrapper for subprocesses\n==============================================\n\nThis is a very thin layer on top of stdlib's subprocess module. It is simply\nfor some convenient functions that are needed in many of my projects. \n\nFull documentation could come later but if you really want something that makes\nusing subprocess much easier I would personally try envoy. However, at this\ntime envoy seemed a bit too early in it's development to use so I created my\nown very thin layer to satisfy my needs for the time being.\n\nIf you'd like something with higher aspirations please check out envoy.\n\nExamples\n--------\n\nSimple example::\n \n import subwrap\n\n response = subwrap.run(['echo', 'hello'])\n \n # Display hello\n print response.std_out\n\nBy default subwrap throws a ``CommandError`` if the command being run exits with an exit\ncode that is not zero. To catch default command errors::\n\n import subwrap\n\n try:\n response = subwrap.run(['false'])\n except subwrap.CommandError, e:\n #this is the response, you can do what you want here\n response = e.response\n \nHowever that's not always useful. You can have subwrap run your own custom exit\nhandle for each subprocess. Just do the following::\n \n import subwrap\n\n def my_exit_handle(response):\n if response.return_code == 0:\n print \"HAPPY DAY!\"\n else:\n print \"Not as happy\"\n\n # The next line will output \"Not as happy\" to stdout\n response = subwrap.run(['false'], exit_handle=my_exit_handle)\n\nLicense\n-------\n\nMIT License", "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/ravenac95/subwrap", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "subwrap", "package_url": "https://pypi.org/project/subwrap/", "platform": "Unix", "project_url": "https://pypi.org/project/subwrap/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/ravenac95/subwrap" }, "release_url": "https://pypi.org/project/subwrap/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "subwrap - A simple wrapper for subprocess", "version": "0.1.0" }, "last_serial": 800220, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "1f099a797eabd460f24992b55ed1ae99", "sha256": "4759ef703d08a5a37c7757e96c88fa51b22caa2763ac5a7d801a7f9d9089dcb6" }, "downloads": -1, "filename": "subwrap-0.0.1.tar.gz", "has_sig": false, "md5_digest": "1f099a797eabd460f24992b55ed1ae99", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2642, "upload_time": "2012-05-30T03:36:05", "url": "https://files.pythonhosted.org/packages/2f/c0/b0f33d386d68fd0a7fbd0462b5e6c1d0c9f41749a320efacf8466e0e5893/subwrap-0.0.1.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "af24869bca76110a4d670f8e9f9ae145", "sha256": "85dd73960bbf6c72c509daedd206c9bd33f1e21be7cc6b7a730a4b8c9dac20d8" }, "downloads": -1, "filename": "subwrap-0.1.0.tar.gz", "has_sig": false, "md5_digest": "af24869bca76110a4d670f8e9f9ae145", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3318, "upload_time": "2013-03-28T00:12:10", "url": "https://files.pythonhosted.org/packages/1d/69/cde7fb70a468612dcb5c09cac4a9d9ba2add238ed71faa8207a2e3f5bf81/subwrap-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "af24869bca76110a4d670f8e9f9ae145", "sha256": "85dd73960bbf6c72c509daedd206c9bd33f1e21be7cc6b7a730a4b8c9dac20d8" }, "downloads": -1, "filename": "subwrap-0.1.0.tar.gz", "has_sig": false, "md5_digest": "af24869bca76110a4d670f8e9f9ae145", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3318, "upload_time": "2013-03-28T00:12:10", "url": "https://files.pythonhosted.org/packages/1d/69/cde7fb70a468612dcb5c09cac4a9d9ba2add238ed71faa8207a2e3f5bf81/subwrap-0.1.0.tar.gz" } ] }