{ "info": { "author": "Henning Timm", "author_email": "henning.timm@tu-dortmund.de", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development" ], "description": "README\n======\n\nPrintargs - A debugging helper for argparse\n-------------------------------------------\n\nPrint a nicely formatted view of an `argparse.Namespace` object\nfor debugging purposes:\n\n::\n\n import sys\n import argparse \n import printargs\n\n def main(args):\n printargs.show(args)\n # do somthing with args\n\n def get_argument_parser():\n p = argparse.ArgumentParser()\n p.add_argument('-f', '--foo', action='store')\n p.add_argument('-b', '--bar', action='store', type=int)\n p.add_argument('-o', '--output', action='store', default=sys.stdout)\n return p\n\n if __name__ == \"__main__\":\n argument_parser = get_argument_parser()\n args = argument_parser.parse_args()\n main(args)\n\nTo use the output for logging or to edit it use the `printargs.formatted`\nfunction, which returns the string instead of printing it:\n\n::\n\n import sys\n import argparse \n import printargs\n\n def main(args):\n t = printargs.formatted(args)\n with open('log', 'a') as logfile:\n logfile.write(\"Test program called with parameters:\")\n logfile.write(t)\n logfile.write(\"\\n\\n\")\n \n\n def get_argument_parser():\n p = argparse.ArgumentParser()\n p.add_argument('-f', '--foo', action='store')\n p.add_argument('-b', '--bar', action='store', type=int)\n p.add_argument('-o', '--output', action='store', default=sys.stdout)\n return p\n\n if __name__ == \"__main__\":\n argument_parser = get_argument_parser()\n args = argument_parser.parse_args()\n main(args)\n\nInstallation\n~~~~~~~~~~~~\n\nPrintargs can be installed with pip:\n\n::\n\n me@machine:~$ pip install printargs\n\nor from the sources:\n\n::\n\n me@machine:~$ git clone https://HenningTimm@bitbucket.org/HenningTimm/printargs.git\n me@machine:~$ cd printargs\n me@machine:~/printargs$ python setup.py install\n\n\nPlanned features\n~~~~~~~~~~~~~~~~\n\n- curses based output with colors\n\n\nLicense\n~~~~~~~\n\nPrintargs is Open Source and licensed under the `MIT\nLicense `__.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/HenningTimm/printargs", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "printargs", "package_url": "https://pypi.org/project/printargs/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/printargs/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://bitbucket.org/HenningTimm/printargs" }, "release_url": "https://pypi.org/project/printargs/1.0.1/", "requires_dist": null, "requires_python": null, "summary": "Show and print the content of argparse.Namespace (args) objects for debugging.", "version": "1.0.1" }, "last_serial": 1971599, "releases": { "1.0.0": [], "1.0.1": [ { "comment_text": "", "digests": { "md5": "381ae3a93e666ca4a478552b0fa14e08", "sha256": "1e9e0ce407c99d12d977e45c6e45e41695e99438dd86a57a88599d1dcebf87c1" }, "downloads": -1, "filename": "printargs-1.0.1.tar.gz", "has_sig": false, "md5_digest": "381ae3a93e666ca4a478552b0fa14e08", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3003, "upload_time": "2016-02-23T13:03:35", "url": "https://files.pythonhosted.org/packages/03/78/2f8c603c506a7cdab80ae16bdeae8d96a4f0ef7d09bce110b48ee7f1875f/printargs-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "381ae3a93e666ca4a478552b0fa14e08", "sha256": "1e9e0ce407c99d12d977e45c6e45e41695e99438dd86a57a88599d1dcebf87c1" }, "downloads": -1, "filename": "printargs-1.0.1.tar.gz", "has_sig": false, "md5_digest": "381ae3a93e666ca4a478552b0fa14e08", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3003, "upload_time": "2016-02-23T13:03:35", "url": "https://files.pythonhosted.org/packages/03/78/2f8c603c506a7cdab80ae16bdeae8d96a4f0ef7d09bce110b48ee7f1875f/printargs-1.0.1.tar.gz" } ] }