{
"info": {
"author": "J\u00fcrgen Knauth",
"author_email": "pubsrc@binary-overflow.de",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3"
],
"description": "jk_simpleexec\n=============\n\nIntroduction\n------------\n\nThis python module provides a convenient interface to execute commands and catch their output.\n\nInformation about this module can be found here:\n\n* [github.org](https://github.com/jkpubsrc/python-module-jk-simpleexec)\n* [pypi.python.org](https://pypi.python.org/pypi/jk_simpleexec)\n\nHow to use this module\n----------------------\n\n### Import\n\nTo import this module use the following statement:\n\n```python\nimport jk_simpleexec\n```\n\n### Example\n\nHere is an example how to use this module:\n\n```python\nresult = invokeCmd(\"/bin/ls\", [ \"/proc/1\", \"-l\" ])\nresult.dump()\n```\n\n### Method(s)\n\n```python\n#\n# Synchroneously invokes the specified command. Output of STDOUT and STDERR is caught.\n#\n# @param\t\tstring cmdPath\t\t\t\tThe (absolute) path to the program to invoke\n# @param\t\tstring[] cmdArgs\t\t\tA list of arguments. Specify None if you do not want to have any arguments.\n# @param\t\tstring onErrorExceptionMsg\tIf you specify an error message here an exception is thrown. If None is specified\n#\t\t\t\t\t\t\t\t\t\t\tNone will be returned and no exception will be thrown.\n# @return\t\tCommandOutput\t\t\t\tReturns an object representing the results.\n#\ndef invokeCmd(cmdPath, cmdArgs, bRemoveTrailingNewLinesFromStdOut = True, bRemoveTrailingNewLinesFromStdErr = True)\n```\n\n### CommandResult Object\n\n```python\n#\n# The return code of the command after completion.\n# @return\t\tint\t\t\tThe return code.\n#\n@property\ndef returnCode(self)\n```\n\n```python\n#\n# The STDOUT output of the command.\n# @return\t\tstring[]\t\tThe output split into seperate lines. This property always returns a list, never None.\n#\n@property\ndef stdOutLines(self)\n```\n\n```python\n#\n# The STDERR output of the command.\n# @return\t\tstring[]\t\tThe output split into seperate lines. This property always returns a list, never None.\n#\n@property\ndef stdErrLines(self)\n```\n\n```python\n#\n# Returns True iff the return code is not zero or STDERR contains data\n#\n@property\ndef isError(self)\n```\n\n```python\n#\n# If the return code is not zero or STDERR contains data\n# an exception is thrown using the specified exception message.\n#\n# @param\t\tstring exceptionMessage\t\t\tThe message for the exception raised.\n# @return\t\tCommandOutput\t\t\t\t\tIf no exception is raised the object itself is returned.\n#\ndef raiseExceptionOnError(self, exceptionMessage)\n```\n\n```python\n#\n# Write all data to STDOUT. This method is provided for debugging purposes of your software.\n#\ndef dump(self)\n```\n\n```python\n#\n# Returns a dictionary containing all data.\n# @return\t\tdict\t\t\tReturns a dictionary with data registered at the following keys:\n#\t\t\t\t\t\t\t\t\"cmd\", \"cmdArgs\", \"stdOut\", \"stdErr\", \"retCode\"\n#\ndef toJSON(self)\n```\n\nContact Information\n-------------------\n\nThis is Open Source code. That not only gives you the possibility of freely using this code it also\nallows you to contribute. Feel free to contact the author(s) of this software listed below, either\nfor comments, collaboration requests, suggestions for improvement or reporting bugs:\n\n* J\u00fcrgen Knauth: jknauth@uni-goettingen.de, pubsrc@binary-overflow.de\n\nLicense\n-------\n\nThis software is provided under the following license:\n\n* Apache Software License 2.0",
"description_content_type": "text/markdown",
"docs_url": null,
"download_url": "https://github.com/jkpubsrc/python-module-jk-simpleexec/tarball/0.2019.9.11",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/jkpubsrc/python-module-jk-simpleexec",
"keywords": "exec,shell,execute,Popen",
"license": "Apache 2.0",
"maintainer": "",
"maintainer_email": "",
"name": "jk-simpleexec",
"package_url": "https://pypi.org/project/jk-simpleexec/",
"platform": "",
"project_url": "https://pypi.org/project/jk-simpleexec/",
"project_urls": {
"Download": "https://github.com/jkpubsrc/python-module-jk-simpleexec/tarball/0.2019.9.11",
"Homepage": "https://github.com/jkpubsrc/python-module-jk-simpleexec"
},
"release_url": "https://pypi.org/project/jk-simpleexec/0.2019.9.11/",
"requires_dist": null,
"requires_python": "",
"summary": "Python module to run command line programs in a very convenient way.",
"version": "0.2019.9.11"
},
"last_serial": 5821059,
"releases": {
"0.2017.8.28": [
{
"comment_text": "",
"digests": {
"md5": "ba64501a08af045738cee3df2ddb3e8e",
"sha256": "355a51e130edec4b970705cc179f6d97263b73d2343c0e4e96f7ee771f3f689a"
},
"downloads": -1,
"filename": "jk_simpleexec-0.2017.8.28.tar.gz",
"has_sig": false,
"md5_digest": "ba64501a08af045738cee3df2ddb3e8e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3659,
"upload_time": "2017-08-28T17:17:22",
"url": "https://files.pythonhosted.org/packages/77/79/416b79aa3f41e4400f4db13ab3c176d8ef05cbc6131bb317f5419d69cd5f/jk_simpleexec-0.2017.8.28.tar.gz"
}
],
"0.2019.9.11": [
{
"comment_text": "",
"digests": {
"md5": "caee7166b1518424367dac5d8d8407ac",
"sha256": "c388cc123374bf61b5c56d86f8eb156e4971d0fe067c93f20f6dba488f423b39"
},
"downloads": -1,
"filename": "jk_simpleexec-0.2019.9.11.tar.gz",
"has_sig": false,
"md5_digest": "caee7166b1518424367dac5d8d8407ac",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8800,
"upload_time": "2019-09-12T15:06:06",
"url": "https://files.pythonhosted.org/packages/38/d4/762fba79f618cc569a3cfdaea9c94b677c207477d4d810487bb8c57f303f/jk_simpleexec-0.2019.9.11.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "caee7166b1518424367dac5d8d8407ac",
"sha256": "c388cc123374bf61b5c56d86f8eb156e4971d0fe067c93f20f6dba488f423b39"
},
"downloads": -1,
"filename": "jk_simpleexec-0.2019.9.11.tar.gz",
"has_sig": false,
"md5_digest": "caee7166b1518424367dac5d8d8407ac",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8800,
"upload_time": "2019-09-12T15:06:06",
"url": "https://files.pythonhosted.org/packages/38/d4/762fba79f618cc569a3cfdaea9c94b677c207477d4d810487bb8c57f303f/jk_simpleexec-0.2019.9.11.tar.gz"
}
]
}