We looked at the examples in [***Create Graphical User Interfaces with Python***](https://www.dbooks.org/create-graphical-user-interfaces-with-python-1912047918/). ([Jupyter Notebooks](https://github.com/themagpimag/createguis).) The book is a demonstration of using the simple `guizero` package, which is a "wrapper" to a more complex package. `guizero` documentation is at https://lawsie.github.io/
We looked at Chapters 1-3 with code from the book summarized in the Jupyter notebook [`GUI_01.ipynb`](./GUI_01.ipynb)
We tried a few commands taken from https://lawsie.github.io/guizero/usingtk/ and gathered in Jupyter notebook [`GUI_02-tkinter.ipynb`](./GUI_02-tkinter.ipynb)
In `guizero` there is no provision to **open/close a file**. For this we'll add options from `tkinter` (package name: `tk`.)
As a way to use an open and close file command from `tk` we explored a simple Python Script to compute the amino acid composition of a protein contained in a text file. For this the help of *ChatGPT* was enrolled to modify an exisiting script that was studied in the Beginners group: (See [ChatGPT_Protein_Composition.ipynb](https://git.doit.wisc.edu/bcrf/pythonclub/beginners/studygroup/-/blob/main/2023-Spring/2023-02-09-Beginners-session-05/ChatGPT_Protein_Composition.ipynb), or Jupyter viewer [ChatGPT_Protein_Composition.ipynb](https://nbviewer.org/urls/git.doit.wisc.edu/bcrf/pythonclub/beginners/studygroup/-/raw/main/2023-Spring/2023-02-09-Beginners-session-05/ChatGPT_Protein_Composition.ipynb). Code inspired by [number-of-occurences-of-letters-in-a-word](https://unix.stackexchange.com/questions/168379/number-of-occurences-of-letters-in-a-word).)
The output now computes molecular weight, as ChatGPT changed the nature of the dictionary. However, the code is useful in illustrating all the steps necessary to create a functional GUI, including selecting and writing output. The code makes use of user-defined functions.