{ "info": { "author": "Ken Youens-Clark", "author_email": "kyclark@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# dire\n\nPython equivalent of Perl's `warn`/`die` functions.\n\n# Synopsis\n\n````\nfrom dire import *\n\nwarn(\"This will print to sys.stdout\")\ndie(\"This will `warn` and then `sys.exit(1)`\")\ndie(\"This will `warn` and then `sys.exit(2)`\", exit_val=2)\n````\n\n# Description\n\nI miss having these two functions that in Perl. I find myself defining them in most every program I write, so I'm making this module so I can just `import` them.\n\n## warn(msg)\n\nThe `warn` function will simply `print(message, file=sys.stderr)`.\n\n## die(msg, exit_val=1)\n\nThe `die` function will call `warn` with a message and will then call `sys.exit` with the `exit_val` parameter. NB: In Unix, an exit value of `0` indicates no error. The default value of `die.exit_val` is 1 simply because it is not zero. You could choose to set `exit_val=0` to halt program execution without indicating an error.\n\n# Author\n\nKen Youens-Clark \n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/kyclark/dire", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "dire", "package_url": "https://pypi.org/project/dire/", "platform": "", "project_url": "https://pypi.org/project/dire/", "project_urls": { "Homepage": "https://github.com/kyclark/dire" }, "release_url": "https://pypi.org/project/dire/0.1.3/", "requires_dist": null, "requires_python": "", "summary": "Python equivalent of Perl's warn and die functions", "version": "0.1.3" }, "last_serial": 5300117, "releases": { "0.1.3": [ { "comment_text": "", "digests": { "md5": "62f267df58691d7ae97a78d2c5356de8", "sha256": "0a68a71028c6034eefa115abb8ccf5d5030146aaf059d110052d0cd21df47269" }, "downloads": -1, "filename": "dire-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "62f267df58691d7ae97a78d2c5356de8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 2868, "upload_time": "2019-05-21T15:46:37", "url": "https://files.pythonhosted.org/packages/d4/86/6352cad6c089cb339fcc81b626ebce989ead067e7587aa9029f5bc5ed24c/dire-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "84e3d6e3b31281bd54acf3fb38b5cfab", "sha256": "efb08a269d95023fea1211b51f0bd46dba2e6f35d10d0657d566656747d86457" }, "downloads": -1, "filename": "dire-0.1.3.tar.gz", "has_sig": false, "md5_digest": "84e3d6e3b31281bd54acf3fb38b5cfab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1648, "upload_time": "2019-05-21T15:46:39", "url": "https://files.pythonhosted.org/packages/09/a0/0764bedf21632d8288955e57571377b699e84dfedad9a1b01b46ef4764d7/dire-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "62f267df58691d7ae97a78d2c5356de8", "sha256": "0a68a71028c6034eefa115abb8ccf5d5030146aaf059d110052d0cd21df47269" }, "downloads": -1, "filename": "dire-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "62f267df58691d7ae97a78d2c5356de8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 2868, "upload_time": "2019-05-21T15:46:37", "url": "https://files.pythonhosted.org/packages/d4/86/6352cad6c089cb339fcc81b626ebce989ead067e7587aa9029f5bc5ed24c/dire-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "84e3d6e3b31281bd54acf3fb38b5cfab", "sha256": "efb08a269d95023fea1211b51f0bd46dba2e6f35d10d0657d566656747d86457" }, "downloads": -1, "filename": "dire-0.1.3.tar.gz", "has_sig": false, "md5_digest": "84e3d6e3b31281bd54acf3fb38b5cfab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1648, "upload_time": "2019-05-21T15:46:39", "url": "https://files.pythonhosted.org/packages/09/a0/0764bedf21632d8288955e57571377b699e84dfedad9a1b01b46ef4764d7/dire-0.1.3.tar.gz" } ] }