{"id":15963420,"url":"https://github.com/xinetzone/tkinterx","last_synced_at":"2025-08-03T04:40:32.440Z","repository":{"id":43286448,"uuid":"260511111","full_name":"xinetzone/tkinterx","owner":"xinetzone","description":"Use tkinter to create a handy GUI tool.","archived":false,"fork":false,"pushed_at":"2022-03-10T03:59:25.000Z","size":257,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-22T06:37:53.802Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pypi.org/project/tkinterx","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xinetzone.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-01T16:52:46.000Z","updated_at":"2022-03-10T03:59:28.000Z","dependencies_parsed_at":"2022-09-23T12:01:41.011Z","dependency_job_id":null,"html_url":"https://github.com/xinetzone/tkinterx","commit_stats":null,"previous_names":["xinetzone/pychaos"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xinetzone%2Ftkinterx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xinetzone%2Ftkinterx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xinetzone%2Ftkinterx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xinetzone%2Ftkinterx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xinetzone","download_url":"https://codeload.github.com/xinetzone/tkinterx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247177450,"owners_count":20896654,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-07T16:41:28.771Z","updated_at":"2025-04-04T12:27:48.676Z","avatar_url":"https://github.com/xinetzone.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tkinterx\n\n[![GitHub issues](https://img.shields.io/github/issues/xinetzone/pychaos)](https://github.com/xinetzone/pychaos/issues) [![GitHub forks](https://img.shields.io/github/forks/xinetzone/pychaos)](https://github.com/xinetzone/pychaos/network) [![GitHub stars](https://img.shields.io/github/stars/xinetzone/pychaos)](https://github.com/xinetzone/pychaos/stargazers) [![GitHub license](https://img.shields.io/github/license/xinetzone/pychaos)](https://github.com/xinetzone/pychaos/blob/master/LICENSE) [![HitCount](http://hits.dwyl.io/xinetzone/pychaos.svg)](http://hits.dwyl.io/xinetzone/pychaos) ![PyPI - Python Version](https://img.shields.io/pypi/pyversions/cv) ![repo size](https://img.shields.io/github/repo-size/xinetzone/pychaos.svg) [![contributors](https://img.shields.io/github/contributors/xinetzone/pychaos.svg)](https://github.com/xinetzone/pychaos/graphs/contributors) [![watcher](https://img.shields.io/github/watchers/xinetzone/pychaos.svg)](https://github.com/xinetzone/pychaos/watchers)\n\nUse tkinter to create a handy GUI tool.\n\n## PyPI support available\n\nYou can install the latest version using the following command:\n\n```sh\npip install tkinterx\n```\n\nThe following command is used when called:\n\n```python\nimport tkinterx\n```\n\n## A sample: Record your personal information\n\n```python\nclass Window(WindowMeta):\n    def __init__(self, master=None, cnf={}, **kw):\n        super().__init__(master, cnf, **kw)\n\n    def create_widget(self):\n        self.add_row('Please enter your name:', 'name')\n        self.add_row('Please enter your age:', 'age')\n        self.add_row('Enter your information saving path:', 'save_path')\n\n    def save(self, path):\n        table = self.table.todict()\n        with open(path, 'w') as fp:\n            json.dump(table, fp)\n\n    def run(self):\n        self.withdraw()\n        name = self.table['name']\n        age = self.table['age']\n        save_path = str(self.table['save_path'])\n        if '' in [name, age, save_path]:\n            showwarning(self)\n        else:\n            self.save(save_path)\n            askokcancel(self)\n\n\nclass Root(Tk):\n    def __init__(self):\n        super().__init__()\n        self.label_var = StringVar()\n        self.create_widgets()\n        self.layout()\n\n    def create_buttons(self):\n        style = ttk.Style()\n        style.configure(\"C.TButton\",\n                        foreground=\"green\",\n                        background=\"white\",\n                        relief='raise',\n                        justify='center',\n                        font=('YaHei', '10', 'bold'))\n        self.table_button = ttk.Button(self, text='Fill in your name and age:',\n                                       command=self.ask_table,\n                                       style=\"C.TButton\")\n\n    def create_widgets(self):\n        self.create_buttons()\n        self.label = ttk.Label(self, textvariable=self.label_var)\n\n    def ask_table(self):\n        bunch = ask_window(self, Window)\n        name, age = bunch['name'], bunch['age']\n        self.label_var.set(f\"{name}: {age}\")\n\n    def layout(self):\n        self.table_button.pack()\n        self.label.pack()\n\n\nif __name__ == \"__main__\":\n    root = Root()\n    root.geometry('300x200')\n    root.mainloop()\n```\n\nInterface presentation:\n\n![Figure 1: record your personal information](images/name_age.png)\n\nFor more information: [Chinese Manual](https://www.jianshu.com/nb/45403586).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxinetzone%2Ftkinterx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxinetzone%2Ftkinterx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxinetzone%2Ftkinterx/lists"}