This is a simple calculator application designed to mimic the look and functionality of the macOS Calculator. It is built using Python's Tkinter library and provides basic arithmetic operations along with a user-friendly interface. With the help of WhiteSur GTK theme for the Traffic light buttons.
- Basic arithmetic operations: addition, subtraction, multiplication, and division.
- Toggle the sign of the last entered number.
- Clear the entry field with a single button press.
- Input validation to handle errors gracefully.
- Adjustable button layout and styles to resemble the macOS calculator.
To run this application, you need:
- Python 3.x installed on your machine.
- Tkinter (usually included with Python standard libraries).
-
Download the file in Releases
-
Extract it
-
Open a Terminal window in the folder
-
Use this command:
python3 cal.py
-
Voilà!
- I suggest using vinceliuice's WhiteSur GTK theme to get the traffic light buttons like macOS.
- Launch the application, and you will see the calculator interface.
- Use the buttons to perform calculations.
- You can use the
C
button to clear the input. - The
±
button toggles the sign of the last entered number. - The application limits the input length to ensure visibility.
Feel free to customize the appearance and functionality of the calculator. You can modify the button colors, fonts, and other settings in the cal.py
file.
If you wish to contribute to this project, feel free to create a pull request or open an issue for any bugs or feature requests.
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by the macOS Calculator app design.
- Special thanks to the Python community for the support and libraries that made this possible.