{"id":17132934,"url":"https://github.com/cutwell/python-auto-gui","last_synced_at":"2025-08-05T12:33:04.093Z","repository":{"id":41104054,"uuid":"89501975","full_name":"Cutwell/python-auto-gui","owner":"Cutwell","description":"Generate a TkInter GUI from simple Python programs.","archived":false,"fork":false,"pushed_at":"2022-06-28T18:28:28.000Z","size":173,"stargazers_count":12,"open_issues_count":0,"forks_count":5,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-30T04:41:21.837Z","etag":null,"topics":["gui","python","tkinter"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/pythonautogui/","language":"Tcl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Cutwell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"License.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-26T16:13:44.000Z","updated_at":"2024-10-02T23:38:30.000Z","dependencies_parsed_at":"2022-08-28T23:31:38.119Z","dependency_job_id":null,"html_url":"https://github.com/Cutwell/python-auto-gui","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Cutwell/python-auto-gui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cutwell%2Fpython-auto-gui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cutwell%2Fpython-auto-gui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cutwell%2Fpython-auto-gui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cutwell%2Fpython-auto-gui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cutwell","download_url":"https://codeload.github.com/Cutwell/python-auto-gui/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cutwell%2Fpython-auto-gui/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268896866,"owners_count":24325362,"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","status":"online","status_checked_at":"2025-08-05T02:00:12.334Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["gui","python","tkinter"],"created_at":"2024-10-14T19:28:54.175Z","updated_at":"2025-08-05T12:33:03.359Z","avatar_url":"https://github.com/Cutwell.png","language":"Tcl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Python Auto GUI\n_Generate a Tkinter GUI from any Python program_\n\n- Creates a Tkinter GUI to replace any command line interface\n- Interprets your existing code, removing the need for programming a GUI by hand.\n- Dynamically generates tidy applications, with quality of life features such as exporting data to CSV or PDF.\n\n| | | |\n|---|---|---|\n| ![adventure](https://github.com/Cutwell/python-auto-gui/blob/6071edf6515bb744957a6ed5b13f2c43597783d1/.github/images/adventure.png) | ![quiz](https://github.com/Cutwell/python-auto-gui/blob/6071edf6515bb744957a6ed5b13f2c43597783d1/.github/images/quiz.png) | ![greetings](https://github.com/Cutwell/python-auto-gui/blob/6071edf6515bb744957a6ed5b13f2c43597783d1/.github/images/greetings.png) |\n| A choose-your-own adventure | A simple maths quiz | A hello world example |\n\n## Quick-start\n```python\nfrom autogui import print, input, run   # import overrides, and run function\nrun()   # start GUI\n```\n\n### 10 second example\n```python\nfrom autogui import print, input, run   # import overrides, and run function\nrun()   # start GUI\n\nmyAnswer = input(\"What is your name?\")    # renders a textbox and waits for user input\n\ninput(\"Click me to continue\")   # renders a button and waits for user input\n\nprint(\"Hello, \"+myAnswer)   # renders text\n```\n\n| Function | Feature |\n| :---: | :---: |\n| `input()` | Creates a button and waits for the user to press it |\n| `var = input()` | Creates a text box and waits for the user to enter an input |\n| `print()` | Creates a label with the passed text |\n\n### Footer + export options\n```python\nfrom autogui import input, run, footer   # import overrides, and run + footer functions\nrun()   # start GUI\n\nmyAnswer = input(\"What is your name?\")    # renders a textbox and waits for user input\n\nfooter()   # renders a footer with export options\n```\n\n- The footer function is an optional function that can be called at the end of your program to render a footer with export options.\n- These export options are:\n\n| Export | Function |\n| :---: | :---: |\n| `CSV` | Export Q/A's as a CSV file. |\n| `PDF` | Export as a PDF document (currently TODO). |\n| `JPG` | Export as a JPG image (currently TODO). |\n\n- PDF and JPG export are not yet implemented, as usual methods of exporting the tkinter canvas using postscript don't support export of widgets.\n\n## Explaining the code\nIn order to work as a drop-in solution for existing code, we override existing functions in the Python language.\n\n*Print*: The print function is overridden to create a label with the passed text. \n\n*Input*: The input function analyzes the function call to determine if the user is requesting a text box or a button. If the function saves the returned value to a variable, it will create a text box. If the function output is not saved to a variable, it will create a button.\n\n*Thread communication*: The Tkinter GUI runs in a seperate thread to the main application, in order to prevent UI blocking. Communication between the main application and the GUI is done using queues. Print and Input functions place messages in the queue, and the GUI reads them and renders the appropriate UI. The GUI can also place messages on a seperate queue, for instance to return user input from text boxes or buttons to the main application.\n\n## Themeing\nTkinter supports themes to improve the default look and feel of the GUI.\n[rdbende/Azure-ttk-theme](https://github.com/rdbende/Azure-ttk-theme) is the theme used in screenshots for this package (with \"light\" (default) and \"dark\" themes).\nIf no theme folder is found in `themes/azure.tcl` relative to the main `.py` file, the default tkinter theme is used.\n\n*Setting a new theme*\n```python\nfrom autogui import print, input, run   # import overrides, and run function\nrun(theme_name=\"light\", theme_source=\"folder/new_theme.tcl\")   # start GUI\n```\n\n## License\n[MIT](https://opensource.org/licenses/MIT)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcutwell%2Fpython-auto-gui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcutwell%2Fpython-auto-gui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcutwell%2Fpython-auto-gui/lists"}