{ "info": { "author": "Benjamin Johnson", "author_email": "bmjcode@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "description": "**tkFilterList** is a combination of the Tkinter Listbox and Entry widgets that updates to display matching items as you type.\n\n\n## Usage\n\ntkFilterList consists of a single module, `tkfilterlist` (note the module name is lowercase), which exports a single class, `FilterList`.\n\nA brief example program:\n\n```python\n#!/usr/bin/env python3\n\nfrom tkinter import *\nfrom tkinter.messagebox import showinfo\nfrom tkfilterlist import FilterList\nimport operator\n\n# Source items for the FilterList\n# Format: display_text, symbol, operator\nsource = [(\"Addition\", \"+\", operator.add),\n (\"Subtraction\", \"-\", operator.sub),\n (\"Multiplication\", \"*\", operator.mul),\n (\"Division\", \"/\", operator.floordiv)]\n\n# Create a root window\nroot = Tk()\n\n# Create a FilterList widget\nfl = FilterList(root,\n source=source,\n display_rule=lambda item: item[0],\n filter_rule=lambda item, text:\n item[0].lower().startswith(text.lower()))\nfl.pack(side=\"top\", expand=1, fill=\"both\")\n\ndef show_result(event=None):\n a, b = 42, 7\n item = fl.selection()\n if item:\n showinfo(\"Result\",\n \"{0} {1} {2} = {3}\".format(a, item[1], b, item[2](a, b)),\n parent=root)\n\n# Show the result of the calculation on Return or double-click\nfl.bind(\"\", show_result)\nfl.bind(\"\", show_result)\n\n# Focus on the FilterList widget\nfl.focus_set()\n\n# Start Tk's event loop\nroot.mainloop()\n```\n\nFor detailed documentation, try `python -m pydoc tkfilterlist`.\n\n\n## Customization\n\nYou can customize the item display and filtering behavior by setting its `display_rule` and `filter_rule` options, respectively, to your own custom functions. This allows tkFilterList to process lists containing complex datatypes, including nested lists, tuples, and even entire classes. The functions are defined as follows:\n\nFunction | Description\n-------- | -----------\n`display_rule(item)` | Returns the display text for the specified `item`.\n`filter_rule(item, text)` | Returns `True` if the `text` argument matches the specified `item`, `False` otherwise.\n\nThe default display rule is available as `FilterList.default_display_rule`. It returns the string value of `item`, matching the behavior of a standard Listbox widget.\n\nThe default filter rule is available as `FilterList.default_filter_rule`. It returns `True` if an `item` starts with the specified `text` using a case-insensitive match.\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/bmjcode/tkFilterList", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "tkFilterList", "package_url": "https://pypi.org/project/tkFilterList/", "platform": "", "project_url": "https://pypi.org/project/tkFilterList/", "project_urls": { "Homepage": "https://github.com/bmjcode/tkFilterList" }, "release_url": "https://pypi.org/project/tkFilterList/0.1.2/", "requires_dist": null, "requires_python": "", "summary": "Self-filtering Listbox with text entry for Tkinter", "version": "0.1.2" }, "last_serial": 5772119, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "ff384360b6d142a7be5644e69838f3fb", "sha256": "314377641fbd91a1fbfc98653f2c9deeca694b666e82855b123ccf185c9ef12e" }, "downloads": -1, "filename": "tkFilterList-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ff384360b6d142a7be5644e69838f3fb", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8846, "upload_time": "2018-09-12T16:30:42", "url": "https://files.pythonhosted.org/packages/9e/c2/e432dd120b67329dc8da37e955d51380827473aebcaed5bb8621630551bb/tkFilterList-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "13846d076daddfff28c359b2fc8ab967", "sha256": "0678c0d819a5030bf5d6a7d36420422b81195e0f3a1ff6d6bc301e4a4cf2ab61" }, "downloads": -1, "filename": "tkFilterList-0.1.0.tar.gz", "has_sig": false, "md5_digest": "13846d076daddfff28c359b2fc8ab967", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5858, "upload_time": "2018-09-12T16:30:44", "url": "https://files.pythonhosted.org/packages/81/ad/bbeb3a4dd437fb4cc7ab51c0de93efae2d83ee34db551ce7dfafe8fe6554/tkFilterList-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "8360498cb2a2aff3467398700b18ba50", "sha256": "99b35bb571ccb976612c39bf47999c3569e3e54a1d5086c96ffe96ec36a4a748" }, "downloads": -1, "filename": "tkFilterList-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8360498cb2a2aff3467398700b18ba50", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7948, "upload_time": "2019-09-02T15:02:06", "url": "https://files.pythonhosted.org/packages/05/19/a09b4bfc7eb737c23bc8e53103b4faa9a9f481de54ea0b4984571cd719ac/tkFilterList-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "57698287e5718c8dd78659f8dd251f17", "sha256": "2d9c3d002a7208571936de8f82a874169e801176c96e1f9d4e0316793fb2909e" }, "downloads": -1, "filename": "tkFilterList-0.1.1.tar.gz", "has_sig": false, "md5_digest": "57698287e5718c8dd78659f8dd251f17", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5964, "upload_time": "2019-09-02T15:02:07", "url": "https://files.pythonhosted.org/packages/81/51/501425f206c35ca5da1ba2a07ba51edfe9a920e45c8aaa32bc1aeefc4e5c/tkFilterList-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "597b63c3b602489d44731920091d6070", "sha256": "f958c7031a420b3108998fedd052797411a2f55d38998f60f453b7c1b2b224d3" }, "downloads": -1, "filename": "tkFilterList-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "597b63c3b602489d44731920091d6070", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7933, "upload_time": "2019-09-02T18:25:38", "url": "https://files.pythonhosted.org/packages/b4/81/85ab4d461d3f361615716a547468c014235059751caa48eaa4e50bda7ce5/tkFilterList-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fca1fdffbdfc3c5ee6a348406e47d693", "sha256": "f085b690ed70d09fa082d77c7066943875ed6d6146ca59af335fa94aa9ad5efd" }, "downloads": -1, "filename": "tkFilterList-0.1.2.tar.gz", "has_sig": false, "md5_digest": "fca1fdffbdfc3c5ee6a348406e47d693", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5947, "upload_time": "2019-09-02T18:25:39", "url": "https://files.pythonhosted.org/packages/cc/1f/fbb842434191e44bb2765dff80114d529684a67ad067c1c5c8665e20a83b/tkFilterList-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "597b63c3b602489d44731920091d6070", "sha256": "f958c7031a420b3108998fedd052797411a2f55d38998f60f453b7c1b2b224d3" }, "downloads": -1, "filename": "tkFilterList-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "597b63c3b602489d44731920091d6070", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7933, "upload_time": "2019-09-02T18:25:38", "url": "https://files.pythonhosted.org/packages/b4/81/85ab4d461d3f361615716a547468c014235059751caa48eaa4e50bda7ce5/tkFilterList-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fca1fdffbdfc3c5ee6a348406e47d693", "sha256": "f085b690ed70d09fa082d77c7066943875ed6d6146ca59af335fa94aa9ad5efd" }, "downloads": -1, "filename": "tkFilterList-0.1.2.tar.gz", "has_sig": false, "md5_digest": "fca1fdffbdfc3c5ee6a348406e47d693", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5947, "upload_time": "2019-09-02T18:25:39", "url": "https://files.pythonhosted.org/packages/cc/1f/fbb842434191e44bb2765dff80114d529684a67ad067c1c5c8665e20a83b/tkFilterList-0.1.2.tar.gz" } ] }