{ "info": { "author": "Stefaan Himpe", "author_email": "stefaan.himpe@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Utilities" ], "description": "This file is part of argparseui.\n \n argparseui is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n \n argparseui is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n \n You should have received a copy of the GNU General Public License\n along with argparseui. If not, see .\n \n\nargparseui\n==========\n\nPurpose of argparseui\n---------------------\n\nargparseui can be used to quickly auto-generate a UI\nfrom an argparse based command line tool\n\nthe UI has widgets that allow to set up the command line options\n\nargparseui depends on PyQt\n\nState of argparseui\n-------------------\n\nargparseui is a scratch-my-own-itch tool\n\nas such it doesn't support all possibilities of argparse\n\nuse at your own risk, but feel free to log a bug/request\n\nBasic Parser Usage\n------------------\n::\n\n import argparse\n import sys\n from PyQt4 import QtGui\n import argparseui\n \n # EXPERIMENT USING BASIC PARSER \n parser = argparse.ArgumentParser()\n parser.add_argument(\"-m\", \"--make-argument-true\", help=\"optional boolean argument\", action=\"store_true\")\n parser.add_argument(\"-o\",\"--make-other-argument-true\", help=\"optional boolean argument 2\", action=\"store_true\", default=True)\n parser.add_argument(\"-n\",\"--number\", help=\"an optional number\", type=int)\n parser.add_argument(\"-r\",\"--restricted-number\", help=\"one of a few possible numbers\", type=int, choices=[1,2,3], default=2)\n parser.add_argument(\"-c\", \"--counting-argument\", help=\"counting #occurrences\", action=\"count\")\n parser.add_argument(\"-d\", \"--default-value-argument\", help=\"default value argument\", type=float, default=\"3.14\")\n group = parser.add_mutually_exclusive_group()\n group.add_argument(\"-v\", \"--verbose\", action=\"store_true\")\n group.add_argument(\"-q\", \"--quiet\", action=\"store_true\")\n parser.add_argument(\"posarg\", help=\"positional argument\", type=str)\n\n app = QtGui.QApplication(sys.argv)\n a = argparseui.ArgparseUi(parser)\n a.show()\n app.exec_()\n\n if a.result() == 1: # Ok pressed\n parsed_args = a.parse_args() # ask argparse to parse the options\n print parsed_args # print the parsed_options\n\n # Do what you like with the arguments...\n\nExample using save/load button and keeping the dialog open when pressing ok\n-----------------------------------------------------------------------------------------------------\n::\n\n import argparse\n import sys\n from PyQt4 import QtGui\n import argparseui\n\n def do_something(argparseuiinstance):\n options = argparseuiinstance.parse_args()\n print (\"Options: \", options)\n \n parser = argparse.ArgumentParser()\n parser.add_argument(\"-m\", \"--make-argument-true\", help=\"optional boolean argument\", action=\"store_true\")\n parser.add_argument(\"-o\",\"--make-other-argument-true\", help=\"optional boolean argument 2\", action=\"store_true\", default=True)\n\n app = QtGui.QApplication(sys.argv)\n a = argparseui.ArgparseUi(parser,use_save_load_button=True,ok_button_handler=do_something)\n a.show()\n app.exec_()\n if a.result() != 1:\n # Do what you like with the arguments...\n print (\"Cancel pressed\")\n \nExtended features\n-----------------\n\nYou can pass some extra command line arguments to ArgparseUi::\n\n *helptext_default* = string [default: ' [default=%(default)s]']\n this argument can be used to customize the default value annotations in the ui\n\n *remove\\_defaults\\_from_helptext* = True/False [default: False]\n if enabled, this option will remove the default value annotations from \n the labels in the ui\n\n *use\\_save\\_load_button* = True/False [default: False]\n if set to True, three extra buttons [Load options, Save Options, Save Options As] appear\n the options are saved to (or loaded from) a command line option file in a file format compatible with \n argparse's built-in support for loading options from file\n\n *use_scrollbars* = True/False [default: False]\n if set to True, the options are embedded in a scrollable panel\n\n *window_title* = string [default: \"Make your choice\"]\n if set to a string, this string will be used as dialog title\n\n *left\\_label\\_alignment* = True/False [default: None]\n if set to True, the checkboxes are left-aligned. This may be useful on platforms \n like KDE or MacOsx which by default use right-alignment\n \n *ok\\_button\\_handler* = function taking one argument [default:None]\n if set to None, the dialog will close upon clicking the ok button and its result will be set to 1\n if set to a function accepting an ArgparseUi instance as argument, clicking ok will call that function \n with \"self\" as argument\n \n *cancel\\_button\\_handler* = function taking one argument [default:None]\n if set to None, the dialog will close upon clicking cancel and its result will be != 1\n if set to a function accepting an ArgparseUi instance as argument, clicking cancel will call that\n function with \"self\" as argument\n\nContributors\n------------\n\nThe following people have contributed to argparseui\n\n * Stefaan Himpe\n * Thomas Hisch", "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/shimpe/argparseui", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "argparseui", "package_url": "https://pypi.org/project/argparseui/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/argparseui/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/shimpe/argparseui" }, "release_url": "https://pypi.org/project/argparseui/0.0.4/", "requires_dist": null, "requires_python": null, "summary": "Auto generate ui for argparse based command-line tools", "version": "0.0.4" }, "last_serial": 1000218, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "148a03a84d7dd2d6c25daa0b8b97b9fe", "sha256": "64ad1cff9cf354c93d8f3be93022af3aa1b98a44b7457e03075a6527f1732dd6" }, "downloads": -1, "filename": "argparseui-0.0.1.tar.gz", "has_sig": false, "md5_digest": "148a03a84d7dd2d6c25daa0b8b97b9fe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6507, "upload_time": "2013-09-09T20:48:08", "url": "https://files.pythonhosted.org/packages/a6/e1/e0e3aad29932612f2d959c0f91c686c7cd9c986c2a9c42b65cac64846fba/argparseui-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "0b7ddd86b5ee139ecee4f2d4b9134fd7", "sha256": "ed2429b9e63bcbab66b5f4e13ce302ce2c6eddfa1047d4981b659eba515f91bd" }, "downloads": -1, "filename": "argparseui-0.0.2.tar.gz", "has_sig": false, "md5_digest": "0b7ddd86b5ee139ecee4f2d4b9134fd7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9787, "upload_time": "2013-09-22T18:43:56", "url": "https://files.pythonhosted.org/packages/17/80/40b04a32efba237b08188d72a0e4443312e1771f187fd08b16f5380e8abd/argparseui-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "af3c06bbacfd7d2264bc4c9e7b5064c2", "sha256": "33077e39b84d5b1b6d6baeae19b7c42d08ce5d2c3583fd39e8edd229e8c3e31f" }, "downloads": -1, "filename": "argparseui-0.0.3.tar.gz", "has_sig": false, "md5_digest": "af3c06bbacfd7d2264bc4c9e7b5064c2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9830, "upload_time": "2013-11-18T22:14:57", "url": "https://files.pythonhosted.org/packages/8c/f9/c55626c98d0a6c653e405c557d9234b89345428fbb1fae2bda0fa0cf7b59/argparseui-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "d107424c19ed3686a22e717130ba301d", "sha256": "dba92ea8e6d0f04093c43026c60b810c19f18a252113b0543df0197feef28900" }, "downloads": -1, "filename": "argparseui-0.0.4.tar.gz", "has_sig": false, "md5_digest": "d107424c19ed3686a22e717130ba301d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10893, "upload_time": "2014-02-14T20:34:26", "url": "https://files.pythonhosted.org/packages/85/c0/d65df683fa96b2c08cc46e3d8b23a9b6772c9f8e5cbefc78dcf8dbeb5268/argparseui-0.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d107424c19ed3686a22e717130ba301d", "sha256": "dba92ea8e6d0f04093c43026c60b810c19f18a252113b0543df0197feef28900" }, "downloads": -1, "filename": "argparseui-0.0.4.tar.gz", "has_sig": false, "md5_digest": "d107424c19ed3686a22e717130ba301d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10893, "upload_time": "2014-02-14T20:34:26", "url": "https://files.pythonhosted.org/packages/85/c0/d65df683fa96b2c08cc46e3d8b23a9b6772c9f8e5cbefc78dcf8dbeb5268/argparseui-0.0.4.tar.gz" } ] }