Video Demo: https://youtu.be/JgvC4v1Eq80
I decided on Python as my language of choice for the project. Below is a list of just a few reasons for my decision:
- Python is versatile along with clear syntax
- The community seemed to be massive and supportive (as others are I'm sure)
- With that massive community brings forth many pre-built libraries & frameworks
Upon further research into Python, I came to find a few GUI (Graphical User Interface) frameworks/libraries that could be imported once downloaded.
- PySimpleGUI
- Kivy
- PyQt5
While I chose to go with PySimpleGUI for my project, I found that PyQt5 had more to offer also with a decent community along with Kivy being in the same boat that they were both an overkill for this little test of my own.
To further expand on the last statement of testing myself:
- With this final project, I decided to hold myself to:
- Learn more about the language of choice (Python)
- Come up with idea and how to initiate it.
- Research and learn the necessary frameworks/ libraries
- Demonstrate that newfound knowledge by implementing into project
- Create tests & logs to further gain exp testing/logging code
- Come out of it having the ability to LEARN ANY CODE OR LANGUAGE
-I created a program that opens a calculator for use with a themed GUI to match the language of choice
-The fact that the project being a calculator is not all that impressive is something even I thought...haha
-Let me explain below what the end result/goal was for me to achieve! :)
- I did NOT use eval function for any of the application
- Not using the eval function allowed me to learn how not to create the functions for computing but how importing works and more on file handling
- This allowed me to keep the executable file shorter and cleaner.
- After finalizing the functions inside the other Python file, I imported the GUI library and got started on creating the layout and design.
- I went with a 4x5 button layout & display above that
- The color scheme I went with were the Python OG blue & yellow
- Once the application was working, I then decided to implement a logging system to review upon any errors the USER may incur!
- The logging file holds the logs for when the PyCalc is being executed.
- A log message contains the following:
- Operands
- Operators
- Function/location
- Timestamp
- Upon completion of the application, I researched testing of the code.
- I came to find quite a few options in Python
- Just to name a hand full:
- Robot
- PyTest
- Unittest
- DocTest
-For the purpose of this lil project, I chose to go with Unittest. -Unittest is built-in to Python and easily imported -> implemented!
- I did this through a seperate file to keep the testing code from clogging up the source/ production code.