{ "info": { "author": "Cameron Simpson", "author_email": "cs@cskk.id.au", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Assorted process management functions.\n\n## Function `groupargv(pre_argv, argv, post_argv=(), max_argv=None, encode=False)`\n\nDistribute the array `argv` over multiple arrays\nto fit within `MAX_ARGV`.\nReturn a list of argv lists.\n\nParameters:\n* `pre_argv`: the sequence of leading arguments\n* `argv`: the sequence of arguments to distribute; this may not be empty\n* `post_argv`: optional, the sequence of trailing arguments\n* `max_argv`: optional, the maximum length of each distributed\n argument list, default: MAX_ARGV\n* `encode`: default False.\n If true, encode the argv sequences into bytes for accurate tallying.\n If `encode` is a Boolean,\n encode the elements with their .encode() method.\n If `encode` is a `str`, encode the elements with their `.encode()`\n method with `encode` as the encoding name;\n otherwise presume that `encode` is a callable\n for encoding each element.\n\nThe returned argv arrays will contain the encoded element values.\n\n## Function `PidFileManager(path, pid=None)`\n\nContext manager for a pid file.\n\nParameters:\n* `path`: the path to the process id file.\n* `pid`: the process id to store in the pid file,\n default from `os.etpid`.\n\nWrites the process id file at the start\nand removes the process id file at the end.\n\n## Function `pipefrom(argv, trace=False, binary=False, keep_stdin=False, **kw)`\n\nPipe text from a command.\nOptionally trace invocation.\nReturn the `Popen` object with `.stdout` decoded as text.\n\nParameters:\n* `argv`: the command argument list\n* `binary`: if true (default false)\n return the raw stdout instead of a text wrapper\n* `trace`: if true (default `False`),\n if `trace` is `True`, recite invocation to stderr\n otherwise presume that `trace` is a stream\n to which to recite the invocation.\n* `keep_stdin`: if true (default `False`)\n do not attach the command's standard input to the null device.\n The default behaviour is to do so,\n preventing commands from accidentally\n consuming the main process' input stream.\n\nOther keyword arguments are passed to the `io.TextIOWrapper`\nwhich wraps the command's output.\n\n## Function `pipeto(argv, trace=False, **kw)`\n\nPipe text to a command.\nOptionally trace invocation.\nReturn the Popen object with .stdin encoded as text.\n\nParameters:\n* `argv`: the command argument list\n* `trace`: if true (default `False`),\n if `trace` is `True`, recite invocation to stderr\n otherwise presume that `trace` is a stream\n to which to recite the invocation.\n\nOther keyword arguments are passed to the `io.TextIOWrapper`\nwhich wraps the command's input.\n\n## Function `remove_pidfile(path)`\n\nTruncate and remove a pidfile, permissions permitting.\n\n## Function `run(argv, logger=None, pids=None, **kw)`\n\nRun a command. Optionally trace invocation.\nReturn result of subprocess.call.\n\nParameters:\n* `argv`: the command argument list\n* `pids`: if supplied and not None,\n call .add and .remove with the subprocess pid around the execution\n\nOther keyword arguments are passed to `subprocess.call`.\n\n## Function `stop(pid, signum=, wait=None, do_SIGKILL=False)`\n\nStop the process specified by `pid`, optionally await its demise.\n\nParameters:\n* `pid`: process id.\n If `pid` is a string, treat as a process id file and read the\n process id from it.\n* `signum`: the signal to send, default `signal.SIGTERM`.\n* `wait`: whether to wait for the process, default `None`.\n If `None`, return `True` (signal delivered).\n If `0`, wait indefinitely until the process exits as tested by\n `os.kill(pid, 0)`.\n If greater than 0, wait up to `wait` seconds for the process to die;\n if it exits, return `True`, otherwise `False`;\n* `do_SIGKILL`: if true (default `False`),\n send the process `signal.SIGKILL` as a final measure before return.\n\n## Function `write_pidfile(path, pid=None)`\n\nWrite a process id to a pid file.\n\nParameters:\n* `path`: the path to the pid file.\n* `pid`: the process id to write, defautl from `os.getpid`.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/cameron_simpson/css/commits/all", "keywords": "python2,python3", "license": "", "maintainer": "", "maintainer_email": "", "name": "cs.psutils", "package_url": "https://pypi.org/project/cs.psutils/", "platform": "", "project_url": "https://pypi.org/project/cs.psutils/", "project_urls": { "Homepage": "https://bitbucket.org/cameron_simpson/css/commits/all" }, "release_url": "https://pypi.org/project/cs.psutils/20190101/", "requires_dist": null, "requires_python": "", "summary": "Assorted process management functions.", "version": "20190101" }, "last_serial": 4649384, "releases": { "20170906": [ { "comment_text": "", "digests": { "md5": "cc9309df312a762ec5153cc73c0dae2c", "sha256": "d80c7a0aff18f558a39e269c345293ca5ed747a529c57e8879de59f359db1bcc" }, "downloads": -1, "filename": "cs.psutils-20170906.tar.gz", "has_sig": false, "md5_digest": "cc9309df312a762ec5153cc73c0dae2c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2177, "upload_time": "2017-09-05T23:19:27", "url": "https://files.pythonhosted.org/packages/1f/e7/cc028fad715dd05865b58ba4066a31e8ecacbe740330c9dd0c15c5ff42cf/cs.psutils-20170906.tar.gz" } ], "20170906.1": [ { "comment_text": "", "digests": { "md5": "3057a16e8bf7a5539235c9dcadca9001", "sha256": "b0d7d74f3c4cd77b15261f128f791690d797a0e8273ac9a80dd3e908d4e2151d" }, "downloads": -1, "filename": "cs.psutils-20170906.1.tar.gz", "has_sig": false, "md5_digest": "3057a16e8bf7a5539235c9dcadca9001", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3052, "upload_time": "2017-09-05T23:38:09", "url": "https://files.pythonhosted.org/packages/7e/4b/e69965508b5b46cf050e9404d2aa609ae24ec3dd287c3b2da6b46fe19770/cs.psutils-20170906.1.tar.gz" } ], "20170908": [ { "comment_text": "", "digests": { "md5": "001686c8a58e89606edfc4334bfe4203", "sha256": "b98c695aa4f8e654077516f89ff3f8726a61b28be65a6dc8332ca7e89dcb0b3d" }, "downloads": -1, "filename": "cs.psutils-20170908.tar.gz", "has_sig": false, "md5_digest": "001686c8a58e89606edfc4334bfe4203", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3056, "upload_time": "2017-09-07T22:51:02", "url": "https://files.pythonhosted.org/packages/8f/c2/6791aa5d0ab79aaeff2cdfd0c26224733faca67c9f6a9787c69e30b946ec/cs.psutils-20170908.tar.gz" } ], "20170908.1": [ { "comment_text": "", "digests": { "md5": "4f899dccd4a7ca4a2b8ddeeb10b23748", "sha256": "c746a9699e91a1f9e600c209c17bb44e44b76f0425839b48d036f7650e820e66" }, "downloads": -1, "filename": "cs.psutils-20170908.1.tar.gz", "has_sig": false, "md5_digest": "4f899dccd4a7ca4a2b8ddeeb10b23748", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3044, "upload_time": "2017-09-07T23:22:49", "url": "https://files.pythonhosted.org/packages/b0/96/c48cd6ee23d1e59336ad41ca7d3236c2e05e2f9988a837542a00af59292b/cs.psutils-20170908.1.tar.gz" } ], "20171018": [ { "comment_text": "", "digests": { "md5": "81a8cefc6df3339d638259fca301d768", "sha256": "973526059c61ddda4a468f4ad20f6c916e95b992738b490fd3961e8d5636ff1f" }, "downloads": -1, "filename": "cs.psutils-20171018.tar.gz", "has_sig": false, "md5_digest": "81a8cefc6df3339d638259fca301d768", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3186, "upload_time": "2017-10-18T00:11:15", "url": "https://files.pythonhosted.org/packages/7b/84/5b98e9b7c03ffdbcabfc6591a16dce14cf6fc2ff0f527e30d58ebcd316d8/cs.psutils-20171018.tar.gz" } ], "20171031": [ { "comment_text": "", "digests": { "md5": "49a0970a8af5d21d34a9c6de58fef1b6", "sha256": "2118c26075f73bc19b607c6ebe6ef793bfac341a33cacbe47547057039d3b2b0" }, "downloads": -1, "filename": "cs.psutils-20171031.tar.gz", "has_sig": false, "md5_digest": "49a0970a8af5d21d34a9c6de58fef1b6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3285, "upload_time": "2017-10-31T05:23:55", "url": "https://files.pythonhosted.org/packages/ff/36/0a03924bbf9c868c434c2ac601de7bf7def6a5b0b48e7b84df1d1e69b1dd/cs.psutils-20171031.tar.gz" } ], "20171110": [ { "comment_text": "", "digests": { "md5": "ba871c74d7f95fc4eb451329a97ee134", "sha256": "9f7fb6f1fb07a951d86098670fe5efb1a48f1b74ba0b58c37e3d0c92999ec1b2" }, "downloads": -1, "filename": "cs.psutils-20171110.tar.gz", "has_sig": false, "md5_digest": "ba871c74d7f95fc4eb451329a97ee134", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4085, "upload_time": "2017-11-10T05:11:58", "url": "https://files.pythonhosted.org/packages/5d/09/af04037dc3240cc87c809738906ba968c314b693d91222b13cc8ca1084d3/cs.psutils-20171110.tar.gz" } ], "20171112": [ { "comment_text": "", "digests": { "md5": "357c9a07cf2a26b07eaeab611e6d062e", "sha256": "8d4e8e51069569a50ef2c775514ee589a82d168110ed9a6c382e607c9831d236" }, "downloads": -1, "filename": "cs.psutils-20171112.tar.gz", "has_sig": false, "md5_digest": "357c9a07cf2a26b07eaeab611e6d062e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4084, "upload_time": "2017-11-12T10:32:10", "url": "https://files.pythonhosted.org/packages/83/11/6984645b74d6e121b23be760f1f9fb1654b3551920070b3cebec9f4cec04/cs.psutils-20171112.tar.gz" } ], "20190101": [ { "comment_text": "", "digests": { "md5": "c5a40acc1e594d99893f63d62776fdb5", "sha256": "a72a8b72dedaebf86ddcdca80785c54e7ccbc82a45be256e587021c5cd6a88d7" }, "downloads": -1, "filename": "cs.psutils-20190101.tar.gz", "has_sig": false, "md5_digest": "c5a40acc1e594d99893f63d62776fdb5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5078, "upload_time": "2019-01-01T02:45:17", "url": "https://files.pythonhosted.org/packages/90/ff/12ec450eba15801606be549e3c69f8438e59eae69199e44a787c52e7323a/cs.psutils-20190101.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c5a40acc1e594d99893f63d62776fdb5", "sha256": "a72a8b72dedaebf86ddcdca80785c54e7ccbc82a45be256e587021c5cd6a88d7" }, "downloads": -1, "filename": "cs.psutils-20190101.tar.gz", "has_sig": false, "md5_digest": "c5a40acc1e594d99893f63d62776fdb5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5078, "upload_time": "2019-01-01T02:45:17", "url": "https://files.pythonhosted.org/packages/90/ff/12ec450eba15801606be549e3c69f8438e59eae69199e44a787c52e7323a/cs.psutils-20190101.tar.gz" } ] }