{ "info": { "author": "\u211codrigo \u212dacilh\u03b1\u03c2", "author_email": "batalema@cacilhas.info", "bugtrack_url": null, "classifiers": [ "Environment :: X11 Applications", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3 :: Only", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# TkML\n\nLibrary to build [Tkinter](https://docs.python.org/3/library/tkinter.html)\nstructures from [YAML](http://yaml.org/) descriptions.\n\nIt requires [PyYAML 3.12](http://pyyaml.org/wiki/PyYAML).\n\n## Use\n\n```python\nimport tkml\n\n...\n\nwith open(filename) as fp:\n toplevel = tkml.load_fp(fp)\n```\n\nThere is a fixtures factory too:\n\n```python\nimport tkml\n\n# With no arguments, it assumes fixtures/ subdirectory neighbor to current script\nloader = tkml.fixtures()\ntoplevel = loader('my-app.yaml')\n```\n\n### API\n\n`tkml.load_fp()`:\n\n- `fp: io.TextBase`: file pointer to YAML file\n- `master: tkinter.Misc`: parent widget\n- `use_tix: bool`: use or not `tix` \u2013 defaults to false\n- `context`: context to `ctx[]`, `argparse.Namespace`,\n `collections.namedtuple`, or `dict`\n- returns the toplevel widget\n\n`tkml.fixtures()`:\n\n- `origin: str`: the directory containing the YAML files, defaults to\n subdirectory `fixtures/` neighbor to the script calling the factory\n- returns the loader function\n\nLoader function returned by `tkml.fixtures()`:\n\n- `fixture: str`: YAML file name under fixtures directory\n- `master: tkinter.Misc`: parent widget\n- `use_tix: bool`: use or not `tix` \u2013 defaults to false\n- `context`: context to `ctx[]`, `argparse.Namespace`,\n `collections.namedtuple`, or `dict`\n- returns the toplevel widget\n\n## Resource example\n\n```yaml\ntk:\n children:\n - frame:\n children:\n - frame:\n children:\n - label:\n text: _(word-to-search)\n pack:\n anchor: nw\n side: left\n expand: false\n - entry:\n pack:\n anchor: ne\n side: right\n fill: x\n expand: true\n bind:\n : ctx[search]\n focus: null\n pack:\n anchor: n\n fill: x\n expand: true\n - button:\n text: _(search)\n command: ctx[search]\n pack:\n anchor: s\n expand: false\n - scrolled-text:\n call/set_text:\n - ctx[set_text]\n - \"!self\"\n wrap: word\n pack:\n anchor: s\n fill: both\n expand: true\n pack:\n fill: both\n expand: true\n\n #\n # Calls after tree is built:\n #\n\n option-add:\n - \"*tearOff\"\n - false\n\n # call/* call the CAR (a callable) with CDR as parameters\n call/set_entry:\n - ctx[set_entry]\n - \"!frame.!frame.!entry\"\n```\n\n- `ctx[*]` gets a key from the context.\n- `_(*)` is the [`gettext` function](https://docs.python.org/3/library/gettext.html#gettext.gettext).\n- `!self` is the current widget.\n- `!frame.frame2` is the second frame from inside de first frame at top.\n\n## Copyright\n\nThis library is under\n[3-Clause BSD License](https://opensource.org/licenses/BSD-3-Clause).\n\nYou can read the copying text\n[here](https://bitbucket.org/cacilhas/tkml/src/master/LICENSE.txt).\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/cacilhas/tkml/", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "tkml", "package_url": "https://pypi.org/project/tkml/", "platform": "", "project_url": "https://pypi.org/project/tkml/", "project_urls": { "Homepage": "https://bitbucket.org/cacilhas/tkml/" }, "release_url": "https://pypi.org/project/tkml/0.5/", "requires_dist": null, "requires_python": "", "summary": "Tkinter gui representation", "version": "0.5" }, "last_serial": 3867084, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "e88158f14d0f81ed6b67a770a976f10b", "sha256": "6c34699c536ab03f27880078c1b868a5dc5808e450bd3b4a5a0e1c3ed584356a" }, "downloads": -1, "filename": "tkml-0.1.tar.gz", "has_sig": false, "md5_digest": "e88158f14d0f81ed6b67a770a976f10b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3114, "upload_time": "2018-05-09T02:05:33", "url": "https://files.pythonhosted.org/packages/b9/12/a48bbe58cbde90f420bd2d3069c04bd3d0a10ec128cce697809001539cfa/tkml-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "997d942731ee979ea9bde6c271053023", "sha256": "360990107ca8f907a180eb7d55b1fe15d82e030b1fc4e1ffddb28e1f6d5d4179" }, "downloads": -1, "filename": "tkml-0.2.tar.gz", "has_sig": false, "md5_digest": "997d942731ee979ea9bde6c271053023", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3113, "upload_time": "2018-05-09T02:26:23", "url": "https://files.pythonhosted.org/packages/20/8a/efd7096e5e58609bc5bf9719e49188199f8a8019e41c18147bacf4df18be/tkml-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "b8dc1f362b4a40ec8adfa9a33f99a176", "sha256": "020de9fc74a227b4166f65c5072b665fb548ffa0c0787827c3d4627f24dca61b" }, "downloads": -1, "filename": "tkml-0.3.tar.gz", "has_sig": false, "md5_digest": "b8dc1f362b4a40ec8adfa9a33f99a176", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3450, "upload_time": "2018-05-09T22:15:19", "url": "https://files.pythonhosted.org/packages/bd/8c/d75d5ca5e2d62783f0f63692126d3176c438d6b07763893843629f3628ce/tkml-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "6b2e6357e0b0a6a31e92255d7c68fe64", "sha256": "b45e988dc6a746e8e2f2f9e6a822746590a1be964cc45beb222db21515b90db5" }, "downloads": -1, "filename": "tkml-0.4.tar.gz", "has_sig": false, "md5_digest": "6b2e6357e0b0a6a31e92255d7c68fe64", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4141, "upload_time": "2018-05-14T02:47:14", "url": "https://files.pythonhosted.org/packages/2c/06/cf195a95be4bfbb852ce2ec7867ac117b568311230311bd9202c77d84fb6/tkml-0.4.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "c0b47c9675f1a4ad579a3db95eaf3e26", "sha256": "373fbf27451bf098d2bb572c48d9d1d892baa210eedd88766ac21e2d9e92bcdb" }, "downloads": -1, "filename": "tkml-0.4.1.tar.gz", "has_sig": false, "md5_digest": "c0b47c9675f1a4ad579a3db95eaf3e26", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4127, "upload_time": "2018-05-14T03:37:09", "url": "https://files.pythonhosted.org/packages/87/ff/86c073f5155eedb6997b50bda5829ac8dfb03655a3346390fe9a6926f8c8/tkml-0.4.1.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "f9c315cb33e67910752d4f8407215f98", "sha256": "2f9e2f462c15e6679b45f37cca23c499376837357369917928e94e562ab9d260" }, "downloads": -1, "filename": "tkml-0.5.tar.gz", "has_sig": false, "md5_digest": "f9c315cb33e67910752d4f8407215f98", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4972, "upload_time": "2018-05-16T02:18:56", "url": "https://files.pythonhosted.org/packages/d4/65/a2f2aea4cd150be167799946d819a2240cd34aaf5ed61a215a0b1457e000/tkml-0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f9c315cb33e67910752d4f8407215f98", "sha256": "2f9e2f462c15e6679b45f37cca23c499376837357369917928e94e562ab9d260" }, "downloads": -1, "filename": "tkml-0.5.tar.gz", "has_sig": false, "md5_digest": "f9c315cb33e67910752d4f8407215f98", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4972, "upload_time": "2018-05-16T02:18:56", "url": "https://files.pythonhosted.org/packages/d4/65/a2f2aea4cd150be167799946d819a2240cd34aaf5ed61a215a0b1457e000/tkml-0.5.tar.gz" } ] }